docs.rs failed to build rong_s3-0.3.1
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.
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
Namespaced Injected Clients
When an S3Client is created from Rust with a non-empty namespace_prefix, JS code cannot override S3 config fields (accessKeyId, secretAccessKey, sessionToken, region, endpoint, bucket, acl, virtualHostedStyle) in method options. Attempting to do so throws TypeError. This prevents JS from escaping the intended bucket/credentials scope.
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, namespace_prefix)— create a pre-configured client from Rust. The optionalnamespace_prefixis transparently prepended to all object keys and stripped from list results.S3Config— configuration struct with public fields (access_key_id,secret_access_key,bucket,region,endpoint, etc.)