A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.rs/aws-sdk-s3/latest/aws_sdk_s3/client/struct.Client.html below:

Client in aws_sdk_s3::client - Rust

pub struct Client {  }
Expand description

Client for Amazon Simple Storage Service

Client for invoking operations on Amazon Simple Storage Service. Each operation on Amazon Simple Storage Service 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_s3::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_s3::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()
    .bucket("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;
Source§ Source

Constructs a fluent builder for the AbortMultipartUpload operation.

Source§ Source

Constructs a fluent builder for the CompleteMultipartUpload operation.

Source§ Source

Constructs a fluent builder for the CopyObject operation.

Source§ Source

Constructs a fluent builder for the CreateBucket operation.

Source§ Source§ Source§ Source

Constructs a fluent builder for the CreateMultipartUpload operation.

Source§ Source

Constructs a fluent builder for the CreateSession operation.

Source§ Source

Constructs a fluent builder for the DeleteBucket operation.

Source§ Source§ Source§ Source

Constructs a fluent builder for the DeleteBucketEncryption operation.

Source§ Source§ Source§ Source§ Source§ Source§ Source§ Source§ Source

Constructs a fluent builder for the DeleteBucketPolicy operation.

Source§ Source§ Source§ Source§ Source

Constructs a fluent builder for the DeleteObject operation.

Source§ Source

Constructs a fluent builder for the DeleteObjectTagging operation.

Source§ Source

Constructs a fluent builder for the DeleteObjects operation.

Source§ Source§ Source§ Source§ Source§ Source

Constructs a fluent builder for the GetBucketCors operation.

Source§ Source§ Source§ Source§ Source§ Source§ Source§ Source§ Source§ Source§ Source§ Source§ Source

Constructs a fluent builder for the GetBucketPolicy operation.

Source§ Source§ Source§ Source§ Source§ Source§ Source§ Source

Constructs a fluent builder for the GetObject operation.

Source§ Source

Constructs a fluent builder for the GetObjectAcl operation.

Source§ Source

Constructs a fluent builder for the GetObjectAttributes operation.

Source§ Source

Constructs a fluent builder for the GetObjectLegalHold operation.

Source§ Source

Constructs a fluent builder for the GetObjectLockConfiguration operation.

Source§ Source

Constructs a fluent builder for the GetObjectRetention operation.

Source§ Source

Constructs a fluent builder for the GetObjectTagging operation.

Source§ Source§ Source§ Source

Constructs a fluent builder for the HeadBucket operation.

Source§ Source

Constructs a fluent builder for the HeadObject operation.

Source§ Source§ Source§ Source§ Source§ Source

Constructs a fluent builder for the ListBuckets operation. This operation supports pagination; See into_paginator().

Source§ Source§ Source

Constructs a fluent builder for the ListMultipartUploads operation.

Source§ Source

Constructs a fluent builder for the ListObjectVersions operation.

Source§ Source

Constructs a fluent builder for the ListObjects operation.

Source§ Source

Constructs a fluent builder for the ListObjectsV2 operation. This operation supports pagination; See into_paginator().

Source§ Source

Constructs a fluent builder for the ListParts operation. This operation supports pagination; See into_paginator().

Source§ Source§ Source

Constructs a fluent builder for the PutBucketAcl operation.

Source§ Source§ Source

Constructs a fluent builder for the PutBucketCors operation.

Source§ Source

Constructs a fluent builder for the PutBucketEncryption operation.

Source§ Source§ Source§ Source

Constructs a fluent builder for the PutBucketLifecycleConfiguration operation.

Source§ Source§ Source§ Source§ Source

Constructs a fluent builder for the PutBucketOwnershipControls operation.

Source§ Source

Constructs a fluent builder for the PutBucketPolicy operation.

Source§ Source

Constructs a fluent builder for the PutBucketReplication operation.

Source§ Source§ Source§ Source

Constructs a fluent builder for the PutBucketVersioning operation.

Source§ Source§ Source

Constructs a fluent builder for the PutObject operation.

Source§ Source

Constructs a fluent builder for the PutObjectAcl operation.

Source§ Source

Constructs a fluent builder for the PutObjectLegalHold operation.

Source§ Source

Constructs a fluent builder for the PutObjectLockConfiguration operation.

Source§ Source

Constructs a fluent builder for the PutObjectRetention operation.

Source§ Source

Constructs a fluent builder for the PutObjectTagging operation.

Source§ Source§ Source

Constructs a fluent builder for the RenameObject operation.

Source§ Source

Constructs a fluent builder for the RestoreObject operation.

Source§ Source

Constructs a fluent builder for the SelectObjectContent operation.

Source§ Source§ Source§ Source

Constructs a fluent builder for the UploadPart operation.

Source§ Source

Constructs a fluent builder for the UploadPartCopy operation.

Source§ Source

Constructs a fluent builder for the WriteGetObjectResponse operation.

Source§ Source

Creates a new client from the service Config.

§Panics

This method will panic in the following cases:

The panic message for each of these will have instructions on how to resolve them.

Source

Returns the client’s configuration.

Source§ Source

Creates a new client from an SDK Config.

§Panics Source§ Source§ Source§ Source§ Source§

🔬This is a nightly-only experimental API. (clone_to_uninit)

Performs copy-assignment from

self

to

dest

.

Read more Source§ Source§

Returns the argument unchanged.

Source§ Source§ Source§

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

Creates a shared type from an unshared type.

Source§ Source§

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§

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
Source§

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
Source§

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
Source§

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
Source§

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
Source§

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
Source§

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
Source§

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
Source§

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
Source§

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
Source§

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
Source§

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
Source§

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
Source§

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
Source§

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
Source§

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
Source§

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
Source§

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
Source§

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
Source§

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§

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
Source§

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
Source§

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
Source§

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
Source§

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
Source§

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
Source§

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
Source§

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
Source§

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
Source§

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
Source§

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
Source§

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
Source§

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
Source§

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
Source§

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
Source§

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
Source§

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
Source§

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
Source§

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
Source§

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§

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
Source§

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
Source§

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
Source§

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());
Source§

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());
Source§

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
Source§

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
Source§

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
Source§

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
Source§

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§

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
Source§

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
Source§

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
Source§

👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
Source§

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
Source§

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
Source§

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
Source§

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);
Source§ Source§

Apply a style wholesale to

self

. Any previous style is replaced.

Read more Source§ Source§ Source§

The resulting type after obtaining ownership.

Source§

Creates owned data from borrowed data, usually by cloning.

Read more Source§

Uses borrowed data to replace owned data, usually by cloning.

Read more Source§ Source§

The type returned in the event of a conversion error.

Source§

Performs the conversion.

Source§ Source§

The type returned in the event of a conversion error.

Source§

Performs the conversion.

Source§ Source§

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4