pub struct Client { /* private fields */ }Expand description
Client for Agent Registry Control
Client for invoking operations on Agent Registry Control. Each operation on Agent Registry Control 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_agentregistrycontrol::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_agentregistrycontrol::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 CreateRegistry operation has
a Client::create_registry, 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_registry()
.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_registry(&self) -> CreateRegistryFluentBuilder
pub fn create_registry(&self) -> CreateRegistryFluentBuilder
Constructs a fluent builder for the CreateRegistry operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):
required: trueThe name of the registry
description(impl Into<String>)/set_description(Option<String>):
required: falseThe description of the registry
discovery_configuration(DiscoveryConfiguration)/set_discovery_configuration(Option<DiscoveryConfiguration>):
required: falseDiscovery configuration for the registry
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseClient token for idempotency
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseTags to associate with the registry
approval_configuration(ApprovalConfiguration)/set_approval_configuration(Option<ApprovalConfiguration>):
required: falseApproval configuration for registry records
- On success, responds with
CreateRegistryOutputwith field(s):registry_arn(String):The ARN of the created registry
- On failure, responds with
SdkError<CreateRegistryError>
Source§impl Client
impl Client
Sourcepub fn create_registry_record(&self) -> CreateRegistryRecordFluentBuilder
pub fn create_registry_record(&self) -> CreateRegistryRecordFluentBuilder
Constructs a fluent builder for the CreateRegistryRecord operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: trueThe identifier of the registry in which to create the record (ARN or ID)
name(impl Into<String>)/set_name(Option<String>):
required: trueThe name of the registry record
display_name(impl Into<String>)/set_display_name(Option<String>):
required: falseThe human-readable display name of the registry record
description(impl Into<String>)/set_description(Option<String>):
required: falseThe description of the registry record
record_type(RecordType)/set_record_type(Option<RecordType>):
required: trueThe type of the registry record, which determines the descriptor format
descriptors(Descriptors)/set_descriptors(Option<Descriptors>):
required: trueThe typed descriptor content for the registry record
record_version(impl Into<String>)/set_record_version(Option<String>):
required: falseThe version of the registry record
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseClient token for idempotency
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseTags to associate with the registry record
- On success, responds with
CreateRegistryRecordOutputwith field(s):record_arn(String):The ARN of the created registry record
status(RegistryRecordStatus):The status of the registry record, set to CREATING while the asynchronous workflow is in progress
- On failure, responds with
SdkError<CreateRegistryRecordError>
Source§impl Client
impl Client
Sourcepub fn delete_registry(&self) -> DeleteRegistryFluentBuilder
pub fn delete_registry(&self) -> DeleteRegistryFluentBuilder
Constructs a fluent builder for the DeleteRegistry operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: trueThe identifier of the registry to delete (ARN or ID)
- On success, responds with
DeleteRegistryOutputwith field(s):status(RegistryStatus):Current status of the registry, set to DELETING when deletion is initiated
- On failure, responds with
SdkError<DeleteRegistryError>
Source§impl Client
impl Client
Sourcepub fn delete_registry_record(&self) -> DeleteRegistryRecordFluentBuilder
pub fn delete_registry_record(&self) -> DeleteRegistryRecordFluentBuilder
Constructs a fluent builder for the DeleteRegistryRecord operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: trueThe identifier of the registry containing the record (ARN or ID)
record_id(impl Into<String>)/set_record_id(Option<String>):
required: trueThe identifier of the registry record to delete (ARN or ID)
- On success, responds with
DeleteRegistryRecordOutput - On failure, responds with
SdkError<DeleteRegistryRecordError>
Source§impl Client
impl Client
Sourcepub fn get_registry(&self) -> GetRegistryFluentBuilder
pub fn get_registry(&self) -> GetRegistryFluentBuilder
Constructs a fluent builder for the GetRegistry operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: trueThe identifier of the registry to retrieve (ARN or ID)
- On success, responds with
GetRegistryOutputwith field(s):name(String):The name of the registry
description(Option<String>):The description of the registry
registry_id(String):The unique identifier of the registry
registry_arn(String):The ARN of the registry
discovery_configuration(Option<DiscoveryConfiguration>):Discovery configuration for the registry
approval_configuration(Option<ApprovalConfiguration>):Approval configuration for registry records
status(RegistryStatus):Current status of the registry
status_reason(Option<String>):The reason for the current status. Typically populated when the status indicates a failure state.
created_at(DateTime):The timestamp when the registry was created
updated_at(DateTime):The timestamp when the registry was last updated
- On failure, responds with
SdkError<GetRegistryError>
Source§impl Client
impl Client
Sourcepub fn get_registry_record(&self) -> GetRegistryRecordFluentBuilder
pub fn get_registry_record(&self) -> GetRegistryRecordFluentBuilder
Constructs a fluent builder for the GetRegistryRecord operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: trueThe identifier of the registry containing the record (ARN or ID)
record_id(impl Into<String>)/set_record_id(Option<String>):
required: trueThe identifier of the registry record to retrieve (ARN or ID)
- On success, responds with
GetRegistryRecordOutputwith field(s):registry_arn(String):The &ARN; of the parent registry that owns the record.
record_arn(String):The &ARN; of the registry record.
record_id(String):The unique identifier of the registry record.
name(String):The name of the registry record. Names are unique within a registry.
display_name(Option<String>):The human-readable display name of the registry record.
description(Option<String>):A description of the registry record.
record_type(RecordType):The type of the registry record, such as MCP, AGENT, SKILL, or CUSTOM.
descriptors(Option<Descriptors>):The typed descriptors that define the content of the registry record.
record_version(Option<String>):The version identifier of the registry record.
status(RegistryRecordStatus):The lifecycle status of the registry record.
created_at(DateTime):The timestamp when the registry record was created.
updated_at(DateTime):The timestamp when the registry record was last updated.
status_reason(Option<String>):The reason for the current status. Typically populated when the status indicates a failure state.
- On failure, responds with
SdkError<GetRegistryRecordError>
Source§impl Client
impl Client
Sourcepub fn list_registries(&self) -> ListRegistriesFluentBuilder
pub fn list_registries(&self) -> ListRegistriesFluentBuilder
Constructs a fluent builder for the ListRegistries operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
max_results(i32)/set_max_results(Option<i32>):
required: falseMaximum number of results to return
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseToken for pagination
filters(RegistryFilter)/set_filters(Option<Vec::<RegistryFilter>>):
required: falseFilters to apply to the registry list
- On success, responds with
ListRegistriesOutputwith field(s):registries(Vec::<RegistrySummary>):List of registry summaries
next_token(Option<String>):Token for next page of results
- On failure, responds with
SdkError<ListRegistriesError>
Source§impl Client
impl Client
Sourcepub fn list_registry_records(&self) -> ListRegistryRecordsFluentBuilder
pub fn list_registry_records(&self) -> ListRegistryRecordsFluentBuilder
Constructs a fluent builder for the ListRegistryRecords operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: trueThe identifier of the registry to list records from (ARN or ID)
max_results(i32)/set_max_results(Option<i32>):
required: falseMaximum number of records to return
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseToken for pagination
filters(RegistryRecordFilter)/set_filters(Option<Vec::<RegistryRecordFilter>>):
required: falseFilters to apply to the registry record list
- On success, responds with
ListRegistryRecordsOutputwith field(s):registry_records(Vec::<RegistryRecordSummary>):List of registry record summaries
next_token(Option<String>):Token for next page of results
- On failure, responds with
SdkError<ListRegistryRecordsError>
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
ARN of a taggable Agent Registry resource.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<HashMap::<String, String>>): A map of tag keys to tag values returned by read operations (may be empty).
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn submit_registry_record_for_approval(
&self,
) -> SubmitRegistryRecordForApprovalFluentBuilder
pub fn submit_registry_record_for_approval( &self, ) -> SubmitRegistryRecordForApprovalFluentBuilder
Constructs a fluent builder for the SubmitRegistryRecordForApproval operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: trueThe identifier of the registry containing the record (ARN or ID)
record_id(impl Into<String>)/set_record_id(Option<String>):
required: trueThe identifier of the registry record to submit for approval (ARN or ID)
- On success, responds with
SubmitRegistryRecordForApprovalOutputwith field(s):registry_arn(String):The ARN of the registry
record_arn(String):The ARN of the registry record
record_id(String):The ID of the registry record
status(RegistryRecordStatus):The resulting status of the registry record
updated_at(DateTime):The timestamp when the record was last updated
- On failure, responds with
SdkError<SubmitRegistryRecordForApprovalError>
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
ARN of a taggable Agent Registry resource.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: true
A map of tag keys to tag values.
- 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
ARN of a taggable Agent Registry resource.tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: true
A list of tag keys.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_registry(&self) -> UpdateRegistryFluentBuilder
pub fn update_registry(&self) -> UpdateRegistryFluentBuilder
Constructs a fluent builder for the UpdateRegistry operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: trueThe identifier of the registry to update (ARN or ID)
name(impl Into<String>)/set_name(Option<String>):
required: falseThe updated name of the registry
description(UpdatedDescription)/set_description(Option<UpdatedDescription>):
required: falseThe updated description of the registry
discovery_configuration(UpdatedDiscoveryConfiguration)/set_discovery_configuration(Option<UpdatedDiscoveryConfiguration>):
required: falseThe updated discovery configuration. Changing the discovery authorization can break existing consumers that rely on the previous authorization type.
approval_configuration(UpdatedApprovalConfiguration)/set_approval_configuration(Option<UpdatedApprovalConfiguration>):
required: falseThe updated approval configuration. The change applies only to records that move to PENDING_APPROVAL after the update; records already in PENDING_APPROVAL are unaffected.
- On success, responds with
UpdateRegistryOutputwith field(s):name(String):The name of the registry
description(Option<String>):The description of the registry
registry_id(String):The unique identifier of the registry
registry_arn(String):The ARN of the registry
discovery_configuration(Option<DiscoveryConfiguration>):Discovery configuration for the registry
approval_configuration(Option<ApprovalConfiguration>):Approval configuration for registry records
status(RegistryStatus):Current status of the registry
status_reason(Option<String>):The reason for the current status. Typically populated when the status indicates a failure state.
created_at(DateTime):The timestamp when the registry was created
updated_at(DateTime):The timestamp when the registry was last updated
- On failure, responds with
SdkError<UpdateRegistryError>
Source§impl Client
impl Client
Sourcepub fn update_registry_record(&self) -> UpdateRegistryRecordFluentBuilder
pub fn update_registry_record(&self) -> UpdateRegistryRecordFluentBuilder
Constructs a fluent builder for the UpdateRegistryRecord operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: trueThe identifier of the registry containing the record (ARN or ID)
record_id(impl Into<String>)/set_record_id(Option<String>):
required: trueThe identifier of the registry record to update (ARN or ID)
name(impl Into<String>)/set_name(Option<String>):
required: falseThe updated name of the registry record. Omit to leave the name unchanged.
display_name(UpdatedDisplayName)/set_display_name(Option<UpdatedDisplayName>):
required: falseThe updated display name of the registry record. Omit to leave the display name unchanged; provide an empty wrapper to unset it.
description(UpdatedDescription)/set_description(Option<UpdatedDescription>):
required: falseThe updated description of the registry record. Omit to leave the description unchanged; provide an empty wrapper to unset it.
record_type(RecordType)/set_record_type(Option<RecordType>):
required: falseThe updated type of the registry record. Omit to leave the record type unchanged.
descriptors(UpdatedDescriptors)/set_descriptors(Option<UpdatedDescriptors>):
required: falseThe updated typed descriptor content for the registry record. Omit to leave the descriptors unchanged.
record_version(impl Into<String>)/set_record_version(Option<String>):
required: falseThe updated version of the registry record. Omit to leave the version unchanged.
trigger_synchronization(bool)/set_trigger_synchronization(Option<bool>):
required: falseWhether to trigger synchronization of the record’s descriptor content from its source
- On success, responds with
UpdateRegistryRecordOutputwith field(s):registry_arn(String):The &ARN; of the parent registry that owns the record.
record_arn(String):The &ARN; of the registry record.
record_id(String):The unique identifier of the registry record.
name(String):The name of the registry record. Names are unique within a registry.
display_name(Option<String>):The human-readable display name of the registry record.
description(Option<String>):A description of the registry record.
record_type(RecordType):The type of the registry record, such as MCP, AGENT, SKILL, or CUSTOM.
descriptors(Option<Descriptors>):The typed descriptors that define the content of the registry record.
record_version(Option<String>):The version identifier of the registry record.
status(RegistryRecordStatus):The lifecycle status of the registry record.
created_at(DateTime):The timestamp when the registry record was created.
updated_at(DateTime):The timestamp when the registry record was last updated.
status_reason(Option<String>):The reason for the current status. Typically populated when the status indicates a failure state.
- On failure, responds with
SdkError<UpdateRegistryRecordError>
Source§impl Client
impl Client
Sourcepub fn update_registry_record_status(
&self,
) -> UpdateRegistryRecordStatusFluentBuilder
pub fn update_registry_record_status( &self, ) -> UpdateRegistryRecordStatusFluentBuilder
Constructs a fluent builder for the UpdateRegistryRecordStatus operation.
- The fluent builder is configurable:
registry_id(impl Into<String>)/set_registry_id(Option<String>):
required: trueThe identifier of the registry containing the record (ARN or ID)
record_id(impl Into<String>)/set_record_id(Option<String>):
required: trueThe identifier of the registry record to update the status of (ARN or ID)
status(RegistryRecordStatus)/set_status(Option<RegistryRecordStatus>):
required: trueThe target status for the registry record
status_reason(impl Into<String>)/set_status_reason(Option<String>):
required: trueThe reason for the status change, for example why the record was approved, rejected, or deprecated
- On success, responds with
UpdateRegistryRecordStatusOutputwith field(s):registry_arn(String):The ARN of the registry
record_arn(String):The ARN of the registry record
record_id(String):The ID of the registry record
status(RegistryRecordStatus):The resulting status of the registry record
status_reason(String):The reason for the status change
updated_at(DateTime):The timestamp when the record was last updated
- On failure, responds with
SdkError<UpdateRegistryRecordStatusError>
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§
Source§impl Waiters for Client
impl Waiters for Client
Source§fn wait_until_registry_ready(&self) -> RegistryReadyFluentBuilder
fn wait_until_registry_ready(&self) -> RegistryReadyFluentBuilder
registry_readySource§fn wait_until_registry_record_approved(
&self,
) -> RegistryRecordApprovedFluentBuilder
fn wait_until_registry_record_approved( &self, ) -> RegistryRecordApprovedFluentBuilder
registry_record_approvedAuto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze 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);