rskit-storage
File I/O, local storage, temp files, MIME detection, and the shared storage backend registry.
Capabilities
FileSource— unified reference to local path, URL, bytes, or temp fileFileSink/FileWriter— buffered output destinationsFileMeta,FileKind— metadata and broad category detection (Video, Audio, Image, …)detect_mime/detect_kind— magic-byte + extension fallbackFileStoretrait with a local filesystem backendStorageRegistryfor explicit, config-driven backend selection- local backend keys and write targets are confined under the configured root and reject
.., absolute path escapes, and symlink traversal before creating parent directories TempFile/TempDir— RAII-managed temporaries (auto-deleted on drop)- Async streaming reads and file transfers
Cloud backends live in opt-in adapter crates:
rskit-storage-s3for Amazon S3 and S3-compatible storesrskit-storage-gcsfor Google Cloud Storage
Adapter crates register through an application-owned StorageRegistry;
importing an adapter crate has no side effects.
Usage
[]
= "0.2.0-alpha.3"
use ;
use AppResult;
async
Backend registry
use ;
# async