Enum telebot::file::File[][src]

pub enum File {
    Memory {
        name: String,
        source: Box<Read + Send>,
    },
    Disk {
        path: PathBuf,
    },
    Telegram(String),
    Url(String),
}

A Telegram file which contains a readable source and a filename

Variants

Fields of Memory

Fields of Disk

Methods

impl File
[src]

Trait Implementations

impl<'a> TryFrom<&'a str> for File
[src]

Construct a Telegram file from a local path

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<'a, S: Read + Send + 'static> TryFrom<(&'a str, S)> for File
[src]

Construct a Telegram file from an object which implements the Read trait

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

Auto Trait Implementations

impl Send for File

impl !Sync for File