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: FileMeta
Metadata of the file.
Note that FileMeta
’s fields are available on File
too (via deref
coercion).
path: String
File 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
source§impl PartialEq<File> for File
impl PartialEq<File> for File
impl Eq for File
impl StructuralEq for File
impl StructuralPartialEq for File
Auto Trait Implementations§
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnwindSafe for File
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more