pub async fn download_object<E, C>(
client: Arc<Client>,
bucket: BucketId,
key: String,
dest_path: PathBuf,
request_id: String,
channel: &E,
registry: TransferRegistryHandle,
lock_registry: Arc<LockRegistry>,
cancel_rx: Receiver<()>,
profile_id: ProfileId,
lock_ttl_secs: u64,
log: NotificationLogHandle,
os_notifier: &OsNotifier<C>,
) -> Result<(), AppError>where
E: EventEmitter,
C: OsNotifyChannel,Expand description
Stream-download key from bucket and write it atomically to dest_path.
§Parameters
client— authenticated S3 client for the profile’s region.bucket— target bucket name.key— S3 object key.dest_path— local destination path (final, not.partial).request_id— UUID v4 string fromTransferRegistry::register.channel— TauriAppHandleorMockChannelfor event emission.registry— sharedTransferRegistryHandlefor state updates.lock_registry— resource lock registry; this function acquires and releases the lock.cancel_rx— oneshot receiver; resolved when the caller callsTransferRegistry::cancel.profile_id— used to build theLockScope.lock_ttl_secs— TTL for the acquired lock.log— in-app notification log for terminal-state notifications.os_notifier— OS notification bridge (settings-gated internally).