[][src]Struct tgbot::types::InputFile

pub struct InputFile { /* fields omitted */ }

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]

impl<R> From<R> for InputFile where
    R: Read + Send + 'static, 
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.