pub enum InputFile {
FileId(String),
Url(String),
Bytes {
filename: String,
data: Vec<u8>,
mime_type: String,
},
Attach(String),
}Expand description
Represents a file to be sent.
Variants§
FileId(String)
Send an existing file by its Telegram file_id.
Url(String)
Send a file from a URL (photo ≤5 MB, others ≤20 MB).
Bytes
Upload new file bytes. The filename is sent in the Content-Disposition header.
Fields
Attach(String)
Reference an already-included multipart attachment by attach://<name>.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InputFile
impl RefUnwindSafe for InputFile
impl Send for InputFile
impl Sync for InputFile
impl Unpin for InputFile
impl UnsafeUnpin for InputFile
impl UnwindSafe for InputFile
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