Function teloxide_core::net::download_file
source · pub fn download_file<'o, D>(
client: &Client,
api_url: Url,
token: &str,
path: &str,
dst: &'o mut D
) -> impl Future<Output = Result<(), DownloadError>> + 'owhere
D: ?Sized + AsyncWrite + Unpin,
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
.