Expand description
Media upload, download, and typed wrappers.
§Upload
Client::upload_file: sequential (small files, < 10 MB)Client::upload_file_concurrent: parallel worker pool for large filesClient::upload_stream: reads AsyncRead → calls upload_file
§Download
Client::iter_download: chunk-by-chunk streamingClient::download_media: collect all bytesClient::download_media_concurrent: parallel multi-worker download
§Typed wrappers
Photo, Document, Sticker: typed wrappers over raw TL types.
§Downloadable trait
Downloadable: implemented by Photo, Document, Sticker so you can pass
any of them to iter_download / download_media.
Structs§
- Album
Item - A single item in a multi-media album send.
- Document
- Typed wrapper over a Telegram document (file, video, audio).
- Download
Iter - Sequential chunk-by-chunk download iterator.
- Photo
- Typed wrapper over a Telegram photo.
- Sticker
- Typed wrapper over a Telegram sticker.
- 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.
Functions§
- download_
location_ from_ media - Extract a download [
InputFileLocation] from a rawMessageMediareference.