[][src]Enum rutebot::requests::FileKind

pub enum FileKind<'a> {
    FileId(&'a str),
    Url(&'a str),
    InputFile {
        name: &'a str,
        content: Vec<u8>,
        thumb: Option<Vec<u8>>,
    },
}

File to send

Variants

FileId(&'a str)

Identifier of file on the telegram servers

Url(&'a str)

Http url for the file to be sent. Telegram will download and send the file. 5 MB max size for photos and 20 MB max for other types of content

InputFile

Arbitrary file to be uploaded

Fields of InputFile

name: &'a str

Name of the file

content: Vec<u8>

File content

thumb: Option<Vec<u8>>

Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320

Trait Implementations

impl<'a> Clone for FileKind<'a>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'a> Debug for FileKind<'a>[src]

impl<'a> Serialize for FileKind<'a>[src]

Auto Trait Implementations

impl<'a> Send for FileKind<'a>

impl<'a> Sync for FileKind<'a>

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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

impl<T> Erased for T