Skip to main content

Crate rustlavel_storage

Crate rustlavel_storage 

Source
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§

local
Files on local disk.
s3
S3-compatible object storage.
sigv4
AWS Signature Version 4.

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-Type an object store records and serves back.
normalize
Reject a path that would escape the storage root.