Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
rong_s3
S3-compatible object storage client. Exposed as Rong.S3Client.
JS APIs
Rong.S3Client— S3 client classnew Rong.S3Client(options?)— create a client- Options:
accessKeyId,secretAccessKey,bucket,region,endpoint,sessionToken,acl,virtualHostedStyle
- Options:
file(path, options?)— lazyS3Filereference (no network request)write(path, data, options?)— upload data, returns bytes writtendelete(path)/unlink(path)— delete an objectexists(path)— check if an object existssize(path)— get object size in bytesstat(path)— get object metadata (etag,lastModified,size,type)presign(path, options?)— generate a presigned URLlist(options?)— list objects (prefix,maxKeys,startAfter)
S3File— lazy reference to an S3 object (viaclient.file())text()/json()/bytes()/arrayBuffer()— readwrite(data, options?)— writeslice(start, end)— partial read referenceexists()/stat()/delete()/unlink()— metadata & deletepresign(options?)— presigned URLname/size— getters
Host-injected clients
Every S3Client created from Rust has locked configuration, whether or not it
uses a namespace prefix. JavaScript cannot override accessKeyId,
secretAccessKey, sessionToken, region, endpoint, bucket, acl, or
virtualHostedStyle in method options. This prevents an injected client from
escaping the host-owned credentials and endpoint. Clients constructed from
JavaScript retain the documented per-method configuration overrides.
Allowed option fields per method:
| Method | Allowed options |
|---|---|
file(path, options?) |
(none) |
write(path, data, options?) |
type |
presign(path, options?) |
expiresIn, method |
list(options?) |
prefix, maxKeys, startAfter |
Rust API
S3Client::new(config)— create an unnamespaced host-configured client with locked configuration..with_namespace(prefix)— apply a prefix that is transparently prepended to object keys and stripped from list results.client.into_js_object(ctx)— register the required hidden classes and convert the client into an injectable JavaScript object.S3Config— configuration struct with public fields (access_key_id,secret_access_key,bucket,region,endpoint, etc.)
Use ctx.host_namespace().set("s3", client.into_js_object(ctx)?) to expose the
managed instance as Rong.s3 without creating a separate top-level global.
S3Client stores configuration rather than a live connection, so creating a
cheap wrapper per fixed namespace is preferred over a dynamic resolver on every
S3 operation.