TessariDBDocs
  • 0.34.2-betalatest
  • 0.34.1-beta
  • 0.34.0-beta
  • 0.33.4-beta
  • 0.33.3-beta
  • 0.33.2-beta
  • 0.33.1-beta
  • 0.33.0-beta
  • 0.32.0-beta

The Rust client

tessaridb-s3-client: an async SDK built for moving files — streamed from and to disk, large ones in resumable parts, checksums end to end, presigned links.

cargo add tessaridb-s3-client

tessaridb-s3-client is published on crates.io under Apache-2.0. It speaks the S3 API with AWS Signature Version 4, so it works with TessariDB S3 and with any other S3-compatible store, and it depends on the protocol, never on the server's code.

use tessaridb_s3_client::sign::Credentials;
use tessaridb_s3_client::{BucketName, ClientBuilder, ListObjects, ObjectKey};

let client = ClientBuilder::new("https://s3.example.com", Credentials::new("ACCESS_KEY", "SECRET_KEY"))
    .region("us-east-1")
    .build()?;
let bucket = BucketName::new("photos")?;
let key = ObjectKey::new("2026/cat.jpg")?;
client.put_object(&bucket, &key, b"...".to_vec(), Some("image/jpeg")).await?;
let page = client.list_objects(&bucket, &ListObjects::default()).await?;

What it does for you

  • Names are checked when they are made. BucketName::new and ObjectKey::new refuse what S3 would refuse, and a key with a . or .. path segment, which S3 accepts but an HTTP URL silently collapses.
  • Files stream. upload_file reads the file once to hash it, then sends it in 1 MiB chunks signed with that hash. download_file writes into a hidden .part file and renames it into place only when the whole object arrived.
  • Large files go in parts. Over 16 MiB, a file goes up in parts of 8 MiB or more, four at a time. If parts keep failing on a transient error, upload_file returns UploadInterrupted with the upload ID; resume_upload sends only the parts the server does not already hold intact, and abort_upload discards it.
  • Downloads continue where they stopped, with Range and If-Match on the ETag, so a changed object is refused rather than spliced.
  • Integrity end to end. Uploads declare their CRC64NVME; downloads are checked against every whole-object checksum the server keeps, retried on a mismatch, and ChecksumMismatch is reported if it keeps failing.
  • Presigned links: presign_get and presign_put, from 1 second to 7 days. A PUT link does not sign the body, so share it only with whoever should write that key.

Errors and transport

  • One Error type with a category to branch on (NotFound, Conflict, Unauthorized, Unavailable and the rest), the S3 code, status and request ID kept. Branch on the category, never on the message.
  • Transient failures (a timeout, a lost connection, SlowDown, a 5xx) are retried up to three times with a randomised backoff, then reported as RetriesExhausted.
  • TLS uses the platform's trust store, with no switch to skip certificate checks. A plain http:// endpoint is accepted for a server on the same machine or a private network; the secret key is never sent, but object data travels unencrypted.
  • Buckets are addressed path-style. Redirects are not followed: a signed request sent to another host would be a different request.
The Rust client — TessariDB