Expand description
Transfer registry and domain types for file downloads and uploads.
§Architecture
Transfer— per-transfer state record.TransferKind— discriminates Download vs Upload.TransferState— lifecycle state machine (Queued → Running → terminal).TransferRegistry— in-memory registry with cancellation tokens.TransferRegistryHandle—Arc<RwLock<TransferRegistry>>for Tauri state.TransferSpec— discriminated union describing what to enqueue.TransferFilter— filter enum fortransfer_list.TransferQueue— concurrency-capped scheduling layer overTransferRegistry.TransferQueueHandle—Arc<TransferQueue>for Tauri state.
§OCP contract
Transfergainschecksum,priority,retriesas optional fields later with no breaking change to existing call sites.TransferRegistryis decoupled from transfer logic — upload (task 32) reuses the same registry without modification.TransferStateuses 5 variants as per design.md events line 397.TransferSpecis an open enum — new kinds (Move,Copy) are additive.TransferFilteris extensible without breaking existing call sites.- The concurrency cap is a single
Arc<Semaphore>— rebuilding on settings changes is onerebuild_semaphorecall.
Modules§
- download
- Streaming download implementation.
- notify
- Terminal-state notification helper for transfers.
- progress
- Progress event emission helpers for transfers.
- upload
- Single-part and multipart upload implementation.
Structs§
- Cancel
Token - Sender side of a cancellation signal for one transfer.
- Transfer
- Full state record for one download or upload transfer.
- Transfer
Queue - Concurrency-capped transfer queue wrapping
TransferRegistry. - Transfer
Queue Handle - Tauri managed-state handle for the transfer queue.
- Transfer
Registry - In-memory registry of active and recently-completed transfers.
- Transfer
Registry Handle - Tauri managed state handle for the transfer registry.
Enums§
- Transfer
Filter - Filter applied by
transfer_listto narrow the returned set. - Transfer
Kind - Discriminates between download and upload transfers.
- Transfer
Spec - Discriminated union describing a transfer that can be enqueued into
TransferQueue. - Transfer
State - Lifecycle state of a transfer.