Expand description
rustlavel-storage: files, wherever they live.
ⓘ
storage.put("avatars/7.png", bytes).await?;
let bytes = storage.get("avatars/7.png").await?;One trait over local disk and any S3-compatible object store, so a feature
written against a developer’s storage/app directory runs unchanged
against S3, R2, or MinIO.
Re-exports§
pub use local::LocalStorage;pub use s3::S3Config;pub use s3::S3Storage;
Modules§
Structs§
- Entry
- One stored file’s metadata.
Enums§
- AnyStorage
- Build the configured driver.
- Visibility
- Whether a file is readable without credentials.
Traits§
- Storage
- The operations every driver supports.
Functions§
- content_
type - Guess a content type from the extension, for the
Content-Typean object store records and serves back. - normalize
- Reject a path that would escape the storage root.