Expand description
Media upload, download, and typed media wrappers (G-41 / G-42 / G-43 / G-44).
§Upload
Client::upload_file— sequential (small files, < 10 MB)Client::upload_file_concurrent— G-41 parallel worker pool (big files)Client::upload_stream— reads AsyncRead → calls upload_file
§Download
Client::iter_download— chunk-by-chunk streamingClient::download_media— collect all bytesClient::download_media_concurrent— G-42 parallel multi-worker download
§Typed wrappers (G-43)
Photo, Document, Sticker — ergonomic accessors over raw TL types.
§Downloadable trait (G-44)
Downloadable — implemented by Photo, Document, Sticker so you can pass
any of them to iter_download / download_media.
Structs§
- Document
- Ergonomic wrapper over a Telegram document (file, video, audio, …).
- Download
Iter - Sequential chunk-by-chunk download iterator.
- Photo
- Ergonomic wrapper over a Telegram photo.
- Sticker
- Ergonomic wrapper over a Telegram sticker (a document with sticker attributes).
- Uploaded
File - A successfully uploaded file handle, ready to be sent as media.
Constants§
- DOWNLOAD_
CHUNK_ SIZE - UPLOAD_
CHUNK_ SIZE - Chunk size used for uploads and downloads (512 KB).
Traits§
- Downloadable
- Something that can be downloaded via
Client::iter_download.