Struct teloxide_core::payloads::GetFile
source · pub struct GetFile {
pub file_id: String,
}
Expand description
Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File
object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>
, where <file_path>
is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling GetFile
again.
Fields§
§file_id: String
File identifier to get info about
Implementations§
Trait Implementations§
source§impl PartialEq<GetFile> for GetFile
impl PartialEq<GetFile> for GetFile
source§impl Payload for GetFile
impl Payload for GetFile
source§fn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
If this payload may take long time to execute (e.g.
GetUpdates
with
big timeout
), the minimum timeout that should be used.impl Eq for GetFile
impl StructuralEq for GetFile
impl StructuralPartialEq for GetFile
Auto Trait Implementations§
impl RefUnwindSafe for GetFile
impl Send for GetFile
impl Sync for GetFile
impl Unpin for GetFile
impl UnwindSafe for GetFile
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.