pub struct Client { /* private fields */ }
Expand description
Client for Amazon Glacier
Client for invoking operations on Amazon Glacier. Each operation on Amazon Glacier 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_glacier::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_glacier::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 AbortMultipartUpload
operation has
a Client::abort_multipart_upload
, 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.abort_multipart_upload()
.account_id("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
§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 abort_multipart_upload(&self) -> AbortMultipartUploadFluentBuilder
pub fn abort_multipart_upload(&self) -> AbortMultipartUploadFluentBuilder
Constructs a fluent builder for the AbortMultipartUpload
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
upload_id(impl Into<String>)
/set_upload_id(Option<String>)
:
required: trueThe upload ID of the multipart upload to delete.
- On success, responds with
AbortMultipartUploadOutput
- On failure, responds with
SdkError<AbortMultipartUploadError>
Source§impl Client
impl Client
Sourcepub fn abort_vault_lock(&self) -> AbortVaultLockFluentBuilder
pub fn abort_vault_lock(&self) -> AbortVaultLockFluentBuilder
Constructs a fluent builder for the AbortVaultLock
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
- On success, responds with
AbortVaultLockOutput
- On failure, responds with
SdkError<AbortVaultLockError>
Source§impl Client
impl Client
Constructs a fluent builder for the AddTagsToVault
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseThe tags to add to the vault. Each tag is composed of a key and a value. The value can be an empty string.
- On success, responds with
AddTagsToVaultOutput
- On failure, responds with
SdkError<AddTagsToVaultError>
Source§impl Client
impl Client
Sourcepub fn complete_multipart_upload(&self) -> CompleteMultipartUploadFluentBuilder
pub fn complete_multipart_upload(&self) -> CompleteMultipartUploadFluentBuilder
Constructs a fluent builder for the CompleteMultipartUpload
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
upload_id(impl Into<String>)
/set_upload_id(Option<String>)
:
required: trueThe upload ID of the multipart upload.
archive_size(impl Into<String>)
/set_archive_size(Option<String>)
:
required: falseThe total size, in bytes, of the entire archive. This value should be the sum of all the sizes of the individual parts that you uploaded.
checksum(impl Into<String>)
/set_checksum(Option<String>)
:
required: falseThe SHA256 tree hash of the entire archive. It is the tree hash of SHA256 tree hash of the individual parts. If the value you specify in the request does not match the SHA256 tree hash of the final assembled archive as computed by Amazon S3 Glacier (Glacier), Glacier returns an error and the request fails.
- On success, responds with
CompleteMultipartUploadOutput
with field(s):location(Option<String>)
:The relative URI path of the newly added archive resource.
checksum(Option<String>)
:The checksum of the archive computed by Amazon S3 Glacier.
archive_id(Option<String>)
:The ID of the archive. This value is also included as part of the location.
- On failure, responds with
SdkError<CompleteMultipartUploadError>
Source§impl Client
impl Client
Sourcepub fn complete_vault_lock(&self) -> CompleteVaultLockFluentBuilder
pub fn complete_vault_lock(&self) -> CompleteVaultLockFluentBuilder
Constructs a fluent builder for the CompleteVaultLock
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
lock_id(impl Into<String>)
/set_lock_id(Option<String>)
:
required: trueThe
lockId
value is the lock ID obtained from aInitiateVaultLock
request.
- On success, responds with
CompleteVaultLockOutput
- On failure, responds with
SdkError<CompleteVaultLockError>
Source§impl Client
impl Client
Sourcepub fn create_vault(&self) -> CreateVaultFluentBuilder
pub fn create_vault(&self) -> CreateVaultFluentBuilder
Constructs a fluent builder for the CreateVault
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
- On success, responds with
CreateVaultOutput
with field(s):location(Option<String>)
:The URI of the vault that was created.
- On failure, responds with
SdkError<CreateVaultError>
Source§impl Client
impl Client
Sourcepub fn delete_archive(&self) -> DeleteArchiveFluentBuilder
pub fn delete_archive(&self) -> DeleteArchiveFluentBuilder
Constructs a fluent builder for the DeleteArchive
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
archive_id(impl Into<String>)
/set_archive_id(Option<String>)
:
required: trueThe ID of the archive to delete.
- On success, responds with
DeleteArchiveOutput
- On failure, responds with
SdkError<DeleteArchiveError>
Source§impl Client
impl Client
Sourcepub fn delete_vault(&self) -> DeleteVaultFluentBuilder
pub fn delete_vault(&self) -> DeleteVaultFluentBuilder
Constructs a fluent builder for the DeleteVault
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
- On success, responds with
DeleteVaultOutput
- On failure, responds with
SdkError<DeleteVaultError>
Source§impl Client
impl Client
Sourcepub fn delete_vault_access_policy(&self) -> DeleteVaultAccessPolicyFluentBuilder
pub fn delete_vault_access_policy(&self) -> DeleteVaultAccessPolicyFluentBuilder
Constructs a fluent builder for the DeleteVaultAccessPolicy
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
- On success, responds with
DeleteVaultAccessPolicyOutput
- On failure, responds with
SdkError<DeleteVaultAccessPolicyError>
Source§impl Client
impl Client
Sourcepub fn delete_vault_notifications(
&self,
) -> DeleteVaultNotificationsFluentBuilder
pub fn delete_vault_notifications( &self, ) -> DeleteVaultNotificationsFluentBuilder
Constructs a fluent builder for the DeleteVaultNotifications
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
- On success, responds with
DeleteVaultNotificationsOutput
- On failure, responds with
SdkError<DeleteVaultNotificationsError>
Source§impl Client
impl Client
Sourcepub fn describe_job(&self) -> DescribeJobFluentBuilder
pub fn describe_job(&self) -> DescribeJobFluentBuilder
Constructs a fluent builder for the DescribeJob
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe ID of the job to describe.
- On success, responds with
DescribeJobOutput
with field(s):job_id(Option<String>)
:An opaque string that identifies an Amazon S3 Glacier job.
job_description(Option<String>)
:The job description provided when initiating the job.
action(Option<ActionCode>)
:The job type. This value is either
ArchiveRetrieval
,InventoryRetrieval
, orSelect
.archive_id(Option<String>)
:The archive ID requested for a select job or archive retrieval. Otherwise, this field is null.
vault_arn(Option<String>)
:The Amazon Resource Name (ARN) of the vault from which an archive retrieval was requested.
creation_date(Option<String>)
:The UTC date when the job was created. This value is a string representation of ISO 8601 date format, for example
“2012-03-20T17:03:43.221Z”
.completed(bool)
:The job status. When a job is completed, you get the job’s output using Get Job Output (GET output).
status_code(Option<StatusCode>)
:The status code can be
InProgress
,Succeeded
, orFailed
, and indicates the status of the job.status_message(Option<String>)
:A friendly message that describes the job status.
archive_size_in_bytes(Option<i64>)
:For an archive retrieval job, this value is the size in bytes of the archive being requested for download. For an inventory retrieval or select job, this value is null.
inventory_size_in_bytes(Option<i64>)
:For an inventory retrieval job, this value is the size in bytes of the inventory requested for download. For an archive retrieval or select job, this value is null.
sns_topic(Option<String>)
:An Amazon SNS topic that receives notification.
completion_date(Option<String>)
:The UTC time that the job request completed. While the job is in progress, the value is null.
sha256_tree_hash(Option<String>)
:For an archive retrieval job, this value is the checksum of the archive. Otherwise, this value is null.
The SHA256 tree hash value for the requested range of an archive. If the InitiateJob request for an archive specified a tree-hash aligned range, then this field returns a value.
If the whole archive is retrieved, this value is the same as the ArchiveSHA256TreeHash value.
This field is null for the following:
-
Archive retrieval jobs that specify a range that is not tree-hash aligned
-
Archival jobs that specify a range that is equal to the whole archive, when the job status is
InProgress
-
Inventory jobs
-
Select jobs
-
archive_sha256_tree_hash(Option<String>)
:The SHA256 tree hash of the entire archive for an archive retrieval. For inventory retrieval or select jobs, this field is null.
retrieval_byte_range(Option<String>)
:The retrieved byte range for archive retrieval jobs in the form StartByteValue-EndByteValue. If no range was specified in the archive retrieval, then the whole archive is retrieved. In this case, StartByteValue equals 0 and EndByteValue equals the size of the archive minus 1. For inventory retrieval or select jobs, this field is null.
tier(Option<String>)
:The tier to use for a select or an archive retrieval. Valid values are
Expedited
,Standard
, orBulk
.Standard
is the default.inventory_retrieval_parameters(Option<InventoryRetrievalJobDescription>)
:Parameters used for range inventory retrieval.
job_output_path(Option<String>)
:Contains the job output location.
select_parameters(Option<SelectParameters>)
:Contains the parameters used for a select.
output_location(Option<OutputLocation>)
:Contains the location where the data from the select job is stored.
- On failure, responds with
SdkError<DescribeJobError>
Source§impl Client
impl Client
Sourcepub fn describe_vault(&self) -> DescribeVaultFluentBuilder
pub fn describe_vault(&self) -> DescribeVaultFluentBuilder
Constructs a fluent builder for the DescribeVault
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
- On success, responds with
DescribeVaultOutput
with field(s):vault_arn(Option<String>)
:The Amazon Resource Name (ARN) of the vault.
vault_name(Option<String>)
:The name of the vault.
creation_date(Option<String>)
:The Universal Coordinated Time (UTC) date when the vault was created. This value should be a string in the ISO 8601 date format, for example
2012-03-20T17:03:43.221Z
.last_inventory_date(Option<String>)
:The Universal Coordinated Time (UTC) date when Amazon S3 Glacier completed the last vault inventory. This value should be a string in the ISO 8601 date format, for example
2012-03-20T17:03:43.221Z
.number_of_archives(i64)
:The number of archives in the vault as of the last inventory date. This field will return
null
if an inventory has not yet run on the vault, for example if you just created the vault.size_in_bytes(i64)
:Total size, in bytes, of the archives in the vault as of the last inventory date. This field will return null if an inventory has not yet run on the vault, for example if you just created the vault.
- On failure, responds with
SdkError<DescribeVaultError>
Source§impl Client
impl Client
Sourcepub fn get_data_retrieval_policy(&self) -> GetDataRetrievalPolicyFluentBuilder
pub fn get_data_retrieval_policy(&self) -> GetDataRetrievalPolicyFluentBuilder
Constructs a fluent builder for the GetDataRetrievalPolicy
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens (‘-’) in the ID.
- On success, responds with
GetDataRetrievalPolicyOutput
with field(s):policy(Option<DataRetrievalPolicy>)
:Contains the returned data retrieval policy in JSON format.
- On failure, responds with
SdkError<GetDataRetrievalPolicyError>
Source§impl Client
impl Client
Sourcepub fn get_job_output(&self) -> GetJobOutputFluentBuilder
pub fn get_job_output(&self) -> GetJobOutputFluentBuilder
Constructs a fluent builder for the GetJobOutput
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
job_id(impl Into<String>)
/set_job_id(Option<String>)
:
required: trueThe job ID whose data is downloaded.
range(impl Into<String>)
/set_range(Option<String>)
:
required: falseThe range of bytes to retrieve from the output. For example, if you want to download the first 1,048,576 bytes, specify the range as
bytes=0-1048575
. By default, this operation downloads the entire output.If the job output is large, then you can use a range to retrieve a portion of the output. This allows you to download the entire output in smaller chunks of bytes. For example, suppose you have 1 GB of job output you want to download and you decide to download 128 MB chunks of data at a time, which is a total of eight Get Job Output requests. You use the following process to download the job output:
-
Download a 128 MB chunk of output by specifying the appropriate byte range. Verify that all 128 MB of data was received.
-
Along with the data, the response includes a SHA256 tree hash of the payload. You compute the checksum of the payload on the client and compare it with the checksum you received in the response to ensure you received all the expected data.
-
Repeat steps 1 and 2 for all the eight 128 MB chunks of output data, each time specifying the appropriate byte range.
-
After downloading all the parts of the job output, you have a list of eight checksum values. Compute the tree hash of these values to find the checksum of the entire output. Using the
DescribeJob
API, obtain job information of the job that provided you the output. The response includes the checksum of the entire archive stored in Amazon S3 Glacier. You compare this value with the checksum you computed to ensure you have downloaded the entire archive content with no errors.
-
- On success, responds with
GetJobOutputOutput
with field(s):body(ByteStream)
:The job data, either archive data or inventory data.
checksum(Option<String>)
:The checksum of the data in the response. This header is returned only when retrieving the output for an archive retrieval job. Furthermore, this header appears only under the following conditions:
-
You get the entire range of the archive.
-
You request a range to return of the archive that starts and ends on a multiple of 1 MB. For example, if you have an 3.1 MB archive and you specify a range to return that starts at 1 MB and ends at 2 MB, then the x-amz-sha256-tree-hash is returned as a response header.
-
You request a range of the archive to return that starts on a multiple of 1 MB and goes to the end of the archive. For example, if you have a 3.1 MB archive and you specify a range that starts at 2 MB and ends at 3.1 MB (the end of the archive), then the x-amz-sha256-tree-hash is returned as a response header.
-
status(i32)
:The HTTP response code for a job output request. The value depends on whether a range was specified in the request.
content_range(Option<String>)
:The range of bytes returned by Amazon S3 Glacier. If only partial output is downloaded, the response provides the range of bytes Amazon S3 Glacier returned. For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB.
accept_ranges(Option<String>)
:Indicates the range units accepted. For more information, see RFC2616.
content_type(Option<String>)
:The Content-Type depends on whether the job output is an archive or a vault inventory. For archive data, the Content-Type is application/octet-stream. For vault inventory, if you requested CSV format when you initiated the job, the Content-Type is text/csv. Otherwise, by default, vault inventory is returned as JSON, and the Content-Type is application/json.
archive_description(Option<String>)
:The description of an archive.
- On failure, responds with
SdkError<GetJobOutputError>
Source§impl Client
impl Client
Sourcepub fn get_vault_access_policy(&self) -> GetVaultAccessPolicyFluentBuilder
pub fn get_vault_access_policy(&self) -> GetVaultAccessPolicyFluentBuilder
Constructs a fluent builder for the GetVaultAccessPolicy
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
- On success, responds with
GetVaultAccessPolicyOutput
with field(s):policy(Option<VaultAccessPolicy>)
:Contains the returned vault access policy as a JSON string.
- On failure, responds with
SdkError<GetVaultAccessPolicyError>
Source§impl Client
impl Client
Sourcepub fn get_vault_lock(&self) -> GetVaultLockFluentBuilder
pub fn get_vault_lock(&self) -> GetVaultLockFluentBuilder
Constructs a fluent builder for the GetVaultLock
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
- On success, responds with
GetVaultLockOutput
with field(s):policy(Option<String>)
:The vault lock policy as a JSON string, which uses “" as an escape character.
state(Option<String>)
:The state of the vault lock.
InProgress
orLocked
.expiration_date(Option<String>)
:The UTC date and time at which the lock ID expires. This value can be
null
if the vault lock is in aLocked
state.creation_date(Option<String>)
:The UTC date and time at which the vault lock was put into the
InProgress
state.
- On failure, responds with
SdkError<GetVaultLockError>
Source§impl Client
impl Client
Sourcepub fn get_vault_notifications(&self) -> GetVaultNotificationsFluentBuilder
pub fn get_vault_notifications(&self) -> GetVaultNotificationsFluentBuilder
Constructs a fluent builder for the GetVaultNotifications
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
- On success, responds with
GetVaultNotificationsOutput
with field(s):vault_notification_config(Option<VaultNotificationConfig>)
:Returns the notification configuration set on the vault.
- On failure, responds with
SdkError<GetVaultNotificationsError>
Source§impl Client
impl Client
Sourcepub fn initiate_job(&self) -> InitiateJobFluentBuilder
pub fn initiate_job(&self) -> InitiateJobFluentBuilder
Constructs a fluent builder for the InitiateJob
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
job_parameters(JobParameters)
/set_job_parameters(Option<JobParameters>)
:
required: falseProvides options for specifying job information.
- On success, responds with
InitiateJobOutput
with field(s):location(Option<String>)
:The relative URI path of the job.
job_id(Option<String>)
:The ID of the job.
job_output_path(Option<String>)
:The path to the location of where the select results are stored.
- On failure, responds with
SdkError<InitiateJobError>
Source§impl Client
impl Client
Sourcepub fn initiate_multipart_upload(&self) -> InitiateMultipartUploadFluentBuilder
pub fn initiate_multipart_upload(&self) -> InitiateMultipartUploadFluentBuilder
Constructs a fluent builder for the InitiateMultipartUpload
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
archive_description(impl Into<String>)
/set_archive_description(Option<String>)
:
required: falseThe archive description that you are uploading in parts.
The part size must be a megabyte (1024 KB) multiplied by a power of 2, for example 1048576 (1 MB), 2097152 (2 MB), 4194304 (4 MB), 8388608 (8 MB), and so on. The minimum allowable part size is 1 MB, and the maximum is 4 GB (4096 MB).
part_size(impl Into<String>)
/set_part_size(Option<String>)
:
required: falseThe size of each part except the last, in bytes. The last part can be smaller than this part size.
- On success, responds with
InitiateMultipartUploadOutput
with field(s):location(Option<String>)
:The relative URI path of the multipart upload ID Amazon S3 Glacier created.
upload_id(Option<String>)
:The ID of the multipart upload. This value is also included as part of the location.
- On failure, responds with
SdkError<InitiateMultipartUploadError>
Source§impl Client
impl Client
Sourcepub fn initiate_vault_lock(&self) -> InitiateVaultLockFluentBuilder
pub fn initiate_vault_lock(&self) -> InitiateVaultLockFluentBuilder
Constructs a fluent builder for the InitiateVaultLock
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
policy(VaultLockPolicy)
/set_policy(Option<VaultLockPolicy>)
:
required: falseThe vault lock policy as a JSON string, which uses “" as an escape character.
- On success, responds with
InitiateVaultLockOutput
with field(s):lock_id(Option<String>)
:The lock ID, which is used to complete the vault locking process.
- On failure, responds with
SdkError<InitiateVaultLockError>
Source§impl Client
impl Client
Sourcepub fn list_jobs(&self) -> ListJobsFluentBuilder
pub fn list_jobs(&self) -> ListJobsFluentBuilder
Constructs a fluent builder for the ListJobs
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
limit(i32)
/set_limit(Option<i32>)
:
required: falseThe maximum number of jobs to be returned. The default limit is 50. The number of jobs returned might be fewer than the specified limit, but the number of returned jobs never exceeds the limit.
marker(impl Into<String>)
/set_marker(Option<String>)
:
required: falseAn opaque string used for pagination. This value specifies the job at which the listing of jobs should begin. Get the marker value from a previous List Jobs response. You only need to include the marker if you are continuing the pagination of results started in a previous List Jobs request.
statuscode(impl Into<String>)
/set_statuscode(Option<String>)
:
required: falseThe type of job status to return. You can specify the following values:
InProgress
,Succeeded
, orFailed
.completed(impl Into<String>)
/set_completed(Option<String>)
:
required: falseThe state of the jobs to return. You can specify
true
orfalse
.
- On success, responds with
ListJobsOutput
with field(s):job_list(Option<Vec::<GlacierJobDescription>>)
:A list of job objects. Each job object contains metadata describing the job.
marker(Option<String>)
:An opaque string used for pagination that specifies the job at which the listing of jobs should begin. You get the
marker
value from a previous List Jobs response. You only need to include the marker if you are continuing the pagination of the results started in a previous List Jobs request.
- On failure, responds with
SdkError<ListJobsError>
Source§impl Client
impl Client
Sourcepub fn list_multipart_uploads(&self) -> ListMultipartUploadsFluentBuilder
pub fn list_multipart_uploads(&self) -> ListMultipartUploadsFluentBuilder
Constructs a fluent builder for the ListMultipartUploads
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
limit(i32)
/set_limit(Option<i32>)
:
required: falseSpecifies the maximum number of uploads returned in the response body. If this value is not specified, the List Uploads operation returns up to 50 uploads.
marker(impl Into<String>)
/set_marker(Option<String>)
:
required: falseAn opaque string used for pagination. This value specifies the upload at which the listing of uploads should begin. Get the marker value from a previous List Uploads response. You need only include the marker if you are continuing the pagination of results started in a previous List Uploads request.
- On success, responds with
ListMultipartUploadsOutput
with field(s):uploads_list(Option<Vec::<UploadListElement>>)
:A list of in-progress multipart uploads.
marker(Option<String>)
:An opaque string that represents where to continue pagination of the results. You use the marker in a new List Multipart Uploads request to obtain more uploads in the list. If there are no more uploads, this value is
null
.
- On failure, responds with
SdkError<ListMultipartUploadsError>
Source§impl Client
impl Client
Sourcepub fn list_parts(&self) -> ListPartsFluentBuilder
pub fn list_parts(&self) -> ListPartsFluentBuilder
Constructs a fluent builder for the ListParts
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
upload_id(impl Into<String>)
/set_upload_id(Option<String>)
:
required: trueThe upload ID of the multipart upload.
marker(impl Into<String>)
/set_marker(Option<String>)
:
required: falseAn opaque string used for pagination. This value specifies the part at which the listing of parts should begin. Get the marker value from the response of a previous List Parts response. You need only include the marker if you are continuing the pagination of results started in a previous List Parts request.
limit(i32)
/set_limit(Option<i32>)
:
required: falseThe maximum number of parts to be returned. The default limit is 50. The number of parts returned might be fewer than the specified limit, but the number of returned parts never exceeds the limit.
- On success, responds with
ListPartsOutput
with field(s):multipart_upload_id(Option<String>)
:The ID of the upload to which the parts are associated.
vault_arn(Option<String>)
:The Amazon Resource Name (ARN) of the vault to which the multipart upload was initiated.
archive_description(Option<String>)
:The description of the archive that was specified in the Initiate Multipart Upload request.
part_size_in_bytes(i64)
:The part size in bytes. This is the same value that you specified in the Initiate Multipart Upload request.
creation_date(Option<String>)
:The UTC time at which the multipart upload was initiated.
parts(Option<Vec::<PartListElement>>)
:A list of the part sizes of the multipart upload. Each object in the array contains a
RangeBytes
andsha256-tree-hash
name/value pair.marker(Option<String>)
:An opaque string that represents where to continue pagination of the results. You use the marker in a new List Parts request to obtain more jobs in the list. If there are no more parts, this value is
null
.
- On failure, responds with
SdkError<ListPartsError>
Source§impl Client
impl Client
Sourcepub fn list_provisioned_capacity(&self) -> ListProvisionedCapacityFluentBuilder
pub fn list_provisioned_capacity(&self) -> ListProvisionedCapacityFluentBuilder
Constructs a fluent builder for the ListProvisionedCapacity
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, don’t include any hyphens (‘-’) in the ID.
- On success, responds with
ListProvisionedCapacityOutput
with field(s):provisioned_capacity_list(Option<Vec::<ProvisionedCapacityDescription>>)
:The response body contains the following JSON fields.
- On failure, responds with
SdkError<ListProvisionedCapacityError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForVault
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
- On success, responds with
ListTagsForVaultOutput
with field(s):tags(Option<HashMap::<String, String>>)
:The tags attached to the vault. Each tag is composed of a key and a value.
- On failure, responds with
SdkError<ListTagsForVaultError>
Source§impl Client
impl Client
Sourcepub fn list_vaults(&self) -> ListVaultsFluentBuilder
pub fn list_vaults(&self) -> ListVaultsFluentBuilder
Constructs a fluent builder for the ListVaults
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens (‘-’) in the ID.marker(impl Into<String>)
/set_marker(Option<String>)
:
required: falseA string used for pagination. The marker specifies the vault ARN after which the listing of vaults should begin.
limit(i32)
/set_limit(Option<i32>)
:
required: falseThe maximum number of vaults to be returned. The default limit is 10. The number of vaults returned might be fewer than the specified limit, but the number of returned vaults never exceeds the limit.
- On success, responds with
ListVaultsOutput
with field(s):vault_list(Option<Vec::<DescribeVaultOutput>>)
:List of vaults.
marker(Option<String>)
:The vault ARN at which to continue pagination of the results. You use the marker in another List Vaults request to obtain more vaults in the list.
- On failure, responds with
SdkError<ListVaultsError>
Source§impl Client
impl Client
Sourcepub fn purchase_provisioned_capacity(
&self,
) -> PurchaseProvisionedCapacityFluentBuilder
pub fn purchase_provisioned_capacity( &self, ) -> PurchaseProvisionedCapacityFluentBuilder
Constructs a fluent builder for the PurchaseProvisionedCapacity
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, don’t include any hyphens (‘-’) in the ID.
- On success, responds with
PurchaseProvisionedCapacityOutput
with field(s):capacity_id(Option<String>)
:The ID that identifies the provisioned capacity unit.
- On failure, responds with
SdkError<PurchaseProvisionedCapacityError>
Source§impl Client
impl Client
Constructs a fluent builder for the RemoveTagsFromVault
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: falseA list of tag keys. Each corresponding tag is removed from the vault.
- On success, responds with
RemoveTagsFromVaultOutput
- On failure, responds with
SdkError<RemoveTagsFromVaultError>
Source§impl Client
impl Client
Sourcepub fn set_data_retrieval_policy(&self) -> SetDataRetrievalPolicyFluentBuilder
pub fn set_data_retrieval_policy(&self) -> SetDataRetrievalPolicyFluentBuilder
Constructs a fluent builder for the SetDataRetrievalPolicy
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens (‘-’) in the ID.policy(DataRetrievalPolicy)
/set_policy(Option<DataRetrievalPolicy>)
:
required: falseThe data retrieval policy in JSON format.
- On success, responds with
SetDataRetrievalPolicyOutput
- On failure, responds with
SdkError<SetDataRetrievalPolicyError>
Source§impl Client
impl Client
Sourcepub fn set_vault_access_policy(&self) -> SetVaultAccessPolicyFluentBuilder
pub fn set_vault_access_policy(&self) -> SetVaultAccessPolicyFluentBuilder
Constructs a fluent builder for the SetVaultAccessPolicy
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
policy(VaultAccessPolicy)
/set_policy(Option<VaultAccessPolicy>)
:
required: falseThe vault access policy as a JSON string.
- On success, responds with
SetVaultAccessPolicyOutput
- On failure, responds with
SdkError<SetVaultAccessPolicyError>
Source§impl Client
impl Client
Sourcepub fn set_vault_notifications(&self) -> SetVaultNotificationsFluentBuilder
pub fn set_vault_notifications(&self) -> SetVaultNotificationsFluentBuilder
Constructs a fluent builder for the SetVaultNotifications
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
vault_notification_config(VaultNotificationConfig)
/set_vault_notification_config(Option<VaultNotificationConfig>)
:
required: falseProvides options for specifying notification configuration.
- On success, responds with
SetVaultNotificationsOutput
- On failure, responds with
SdkError<SetVaultNotificationsError>
Source§impl Client
impl Client
Sourcepub fn upload_archive(&self) -> UploadArchiveFluentBuilder
pub fn upload_archive(&self) -> UploadArchiveFluentBuilder
Constructs a fluent builder for the UploadArchive
operation.
- The fluent builder is configurable:
vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.archive_description(impl Into<String>)
/set_archive_description(Option<String>)
:
required: falseThe optional description of the archive you are uploading.
checksum(impl Into<String>)
/set_checksum(Option<String>)
:
required: falseThe SHA256 tree hash of the data being uploaded.
body(ByteStream)
/set_body(ByteStream)
:
required: falseThe data to upload.
- On success, responds with
UploadArchiveOutput
with field(s):location(Option<String>)
:The relative URI path of the newly added archive resource.
checksum(Option<String>)
:The checksum of the archive computed by Amazon S3 Glacier.
archive_id(Option<String>)
:The ID of the archive. This value is also included as part of the location.
- On failure, responds with
SdkError<UploadArchiveError>
Source§impl Client
impl Client
Sourcepub fn upload_multipart_part(&self) -> UploadMultipartPartFluentBuilder
pub fn upload_multipart_part(&self) -> UploadMultipartPartFluentBuilder
Constructs a fluent builder for the UploadMultipartPart
operation.
- The fluent builder is configurable:
account_id(impl Into<String>)
/set_account_id(Option<String>)
:
required: trueThe
AccountId
value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘-
’ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-’) in the ID.vault_name(impl Into<String>)
/set_vault_name(Option<String>)
:
required: trueThe name of the vault.
upload_id(impl Into<String>)
/set_upload_id(Option<String>)
:
required: trueThe upload ID of the multipart upload.
checksum(impl Into<String>)
/set_checksum(Option<String>)
:
required: falseThe SHA256 tree hash of the data being uploaded.
range(impl Into<String>)
/set_range(Option<String>)
:
required: falseIdentifies the range of bytes in the assembled archive that will be uploaded in this part. Amazon S3 Glacier uses this information to assemble the archive in the proper sequence. The format of this header follows RFC 2616. An example header is Content-Range:bytes 0-4194303/*.
body(ByteStream)
/set_body(ByteStream)
:
required: falseThe data to upload.
- On success, responds with
UploadMultipartPartOutput
with field(s):checksum(Option<String>)
:The SHA256 tree hash that Amazon S3 Glacier computed for the uploaded part.
- On failure, responds with
SdkError<UploadMultipartPartError>
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_vault_exists(&self) -> VaultExistsFluentBuilder
fn wait_until_vault_exists(&self) -> VaultExistsFluentBuilder
vault_exists
Source§fn wait_until_vault_not_exists(&self) -> VaultNotExistsFluentBuilder
fn wait_until_vault_not_exists(&self) -> VaultNotExistsFluentBuilder
vault_not_exists
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);