Crate s3

Crate s3 

Source
Expand description

A lean S3 client for Rust.

§Quick start (async)

use s3::{Auth, Client};

let client = Client::builder("https://s3.example.com")?
    .region("us-east-1")
    .auth(Auth::from_env()?)
    .build()?;

let obj = client
    .objects()
    .get("my-bucket", "path/to/object.txt")
    .send()
    .await?;
let bytes = obj.bytes().await?;
println!("{} bytes", bytes.len());

§Quick start (blocking)

use s3::{Auth, BlockingClient};

let client = BlockingClient::builder("https://s3.example.com")?
    .region("us-east-1")
    .auth(Auth::from_env()?)
    .build()?;

let obj = client.objects().get("my-bucket", "path/to/object.txt").send()?;
let bytes = obj.bytes()?;
println!("{} bytes", bytes.len());

§Design

See README for product intent and usage.

Modules§

api
Service entry points and request builders. Service entry points and request builders.
types
Shared request/response types. Shared request and response types.

Structs§

CachedProvider
Cached credentials wrapper with refresh and throttling.
Client
Async S3 client.
ClientBuilder
Builder for Client.
Credentials
Static access credentials with optional session token.
CredentialsSnapshot
Snapshot of credentials and optional expiration metadata.
Region
Region identifier used for signing.

Enums§

AddressingStyle
How the bucket name is encoded into the request URL.
Auth
Authentication configuration for requests.
Error
Error type for request building, transport, and API responses.

Traits§

CredentialsProvider
Source of credential snapshots for request signing.

Type Aliases§

DynCredentialsProvider
Shared credentials provider trait object.
Result
Library result type.