Expand description
One connection to the server, on its own thread: it asks for the file and writes the body into the file the download gives it, telling the download each step.
A connection blocked waiting for the server can’t be interrupted, so the download
never waits for one: it closes the connection’s Outlet, and the connection stops at
its next write without touching the file again.
Structs§
- Closed 🔒
- What a closed outlet leaves: the file it was writing, if it had opened, and how many bytes went through it.
- Dial 🔒
- What a connection asks for:
url, or justrangeof it, with the app’sheaders. - Inner 🔒
- Outlet 🔒
- Where a connection writes: nowhere yet, the download’s file, or nowhere ever again.
Enums§
- Connection
Error 🔒 - Why a connection stopped early.
- Flow 🔒
- Whether a connection can keep writing after a write.
- Slot 🔒
Constants§
Functions§
- copy 🔒
- Copies
bodythroughoutlet:Some(())at the end of the body or once the outlet is full,Nonewhen the download stopped listening first. - spawn 🔒
- Starts a connection asking
agentfor whatdialsays, which writes intooutletand tellseventshow it goes.
Type Aliases§
- Connection
Id 🔒 - Which of a download’s connections an event comes from, counted from 0, so events from one it has stopped can be told apart from the one it runs now.