pub struct File {
pub file_id: String,
pub file_unique_id: String,
pub file_size: Option<i64>,
pub file_path: Option<String>,
}Expand description
A file as returned by getFile — file_path is the download path under
https://api.telegram.org/file/bot<token>/.
Fields§
§file_id: StringIdentifier usable with sendX/getFile.
file_unique_id: StringPersistent identifier invariant across bots and re-uploads.
file_size: Option<i64>File size in bytes, if known.
file_path: Option<String>Server-side download path. Files up to 20MB are downloadable; the path stays valid for at least an hour.
Trait Implementations§
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
Auto Trait Implementations§
impl Freeze for File
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnsafeUnpin 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