[−][src]Struct tgbot::types::InputFile
File to upload
Methods
impl InputFile
[src]
pub fn file_id<S: Into<String>>(file_id: S) -> Self
[src]
Send a file_id that exists on the Telegram servers
pub fn url<S: Into<String>>(url: S) -> Self
[src]
Send an HTTP URL to get a file from the Internet
Telegram will download a file from that URL
pub fn path<P: Into<PathBuf>>(path: P) -> Self
[src]
Path to file in FS (will be uploaded using multipart/form-data)
pub fn reader<R: Into<InputFileReader>>(reader: R) -> Self
[src]
A reader (file will be uploaded using multipart/form-data)
Trait Implementations
impl Debug for InputFile
[src]
impl From<InputFileReader> for InputFile
[src]
fn from(reader: InputFileReader) -> Self
[src]
impl<R> From<R> for InputFile where
R: Read + Send + 'static,
[src]
R: Read + Send + 'static,
Auto Trait Implementations
impl !RefUnwindSafe for InputFile
impl Send for InputFile
impl !Sync for InputFile
impl Unpin for InputFile
impl !UnwindSafe for InputFile
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,