Function teloxide::net::download_file

source ·
pub fn download_file<D, 'o>(
    client: &Client,
    api_url: Url,
    token: &str,
    path: &str,
    dst: &'o mut D
) -> impl Future<Output = Result<(), DownloadError>> + 'owhere
    D: AsyncWrite + Unpin + ?Sized,
Expand description

Download a file from Telegram into dst.

Note: if you don’t need to use a different (from you’re bot) client and don’t need to get all performance (and you don’t, c’mon it’s very io-bound job), then it’s recommended to use Download::download_file.