// TaskHandle represents a task handle for future operations
TaskHandlestruct{
IDstring`json:"id"`
Hashstring`json:"hash"`
}
Statusstring
TaskStatusstruct{
FollowedBy*TaskHandle`json:"-"`// Indicate if the task handle is changed
SavePathstring`json:"save_path,omitempty"`
Namestring`json:"name"`
StateStatus`json:"state"`
Totalint64`json:"total"`
Downloadedint64`json:"downloaded"`
DownloadSpeedint64`json:"download_speed"`
Uploadedint64`json:"uploaded"`
UploadSpeedint64`json:"upload_speed"`
Hashstring`json:"hash,omitempty"`
Files[]TaskFile`json:"files,omitempty"`
Pieces[]byte`json:"pieces,omitempty"`// Hexadecimal representation of the download progress of the peer. The highest bit corresponds to the piece at index 0.