Function teloxide_core::net::download_file[][src]

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

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.