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§
- Cached
Provider - Cached credentials wrapper with refresh and throttling.
- Client
- Async S3 client.
- Client
Builder - Builder for
Client. - Credentials
- Static access credentials with optional session token.
- Credentials
Snapshot - Snapshot of credentials and optional expiration metadata.
- Region
- Region identifier used for signing.
Enums§
- Addressing
Style - 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§
- Credentials
Provider - Source of credential snapshots for request signing.
Type Aliases§
- DynCredentials
Provider - Shared credentials provider trait object.
- Result
- Library result type.