pub struct File {
pub meta: FileMeta,
pub path: String,
}Expand description
This object represents a file ready to be downloaded.
The file can be downloaded via the Bot::download_file(file_path, dst)
method. It is guaranteed that the path from GetFile will be valid for at
least 1 hour. When the path expires, a new one can be requested by calling
GetFile.
Fields§
§meta: FileMetaMetadata of the file.
Note that FileMeta’s fields are available on File too (via deref
coercion).
path: StringFile path. Use Bot::download_file(file_path, dst) to get the file.
Trait Implementations§
source§impl Deref for File
impl Deref for File
source§impl<'de> Deserialize<'de> for File
impl<'de> Deserialize<'de> for File
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more