[][src]Enum rtdlib::types::FileType

pub enum FileType {
    Animation(FileTypeAnimation),
    Audio(FileTypeAudio),
    Document(FileTypeDocument),
    None(FileTypeNone),
    Photo(FileTypePhoto),
    ProfilePhoto(FileTypeProfilePhoto),
    Secret(FileTypeSecret),
    SecretThumbnail(FileTypeSecretThumbnail),
    Secure(FileTypeSecure),
    Sticker(FileTypeSticker),
    Thumbnail(FileTypeThumbnail),
    Unknown(FileTypeUnknown),
    Video(FileTypeVideo),
    VideoNote(FileTypeVideoNote),
    VoiceNote(FileTypeVoiceNote),
    Wallpaper(FileTypeWallpaper),
    // some variants omitted
}

Represents the type of a file

Variants

The file is an animation

The file is an audio file

The file is a document

The data is not a file

The file is a photo

ProfilePhoto(FileTypeProfilePhoto)

The file is a profile photo

The file was sent to a secret chat (the file type is not known to the server)

SecretThumbnail(FileTypeSecretThumbnail)

The file is a thumbnail of a file from a secret chat

The file is a file from Secure storage used for storing Telegram Passport files

The file is a sticker

The file is a thumbnail of another file

The file type is not yet known

The file is a video

The file is a video note

The file is a voice note

The file is a wallpaper or a background pattern

Implementations

impl FileType[src]

pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>[src]

pub fn is_animation(&self) -> bool[src]

pub fn is_audio(&self) -> bool[src]

pub fn is_document(&self) -> bool[src]

pub fn is_none(&self) -> bool[src]

pub fn is_photo(&self) -> bool[src]

pub fn is_profile_photo(&self) -> bool[src]

pub fn is_secret(&self) -> bool[src]

pub fn is_secret_thumbnail(&self) -> bool[src]

pub fn is_secure(&self) -> bool[src]

pub fn is_sticker(&self) -> bool[src]

pub fn is_thumbnail(&self) -> bool[src]

pub fn is_unknown(&self) -> bool[src]

pub fn is_video(&self) -> bool[src]

pub fn is_video_note(&self) -> bool[src]

pub fn is_voice_note(&self) -> bool[src]

pub fn is_wallpaper(&self) -> bool[src]

pub fn on_animation<F: FnOnce(&FileTypeAnimation)>(&self, fnc: F) -> &Self[src]

pub fn on_audio<F: FnOnce(&FileTypeAudio)>(&self, fnc: F) -> &Self[src]

pub fn on_document<F: FnOnce(&FileTypeDocument)>(&self, fnc: F) -> &Self[src]

pub fn on_none<F: FnOnce(&FileTypeNone)>(&self, fnc: F) -> &Self[src]

pub fn on_photo<F: FnOnce(&FileTypePhoto)>(&self, fnc: F) -> &Self[src]

pub fn on_profile_photo<F: FnOnce(&FileTypeProfilePhoto)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_secret<F: FnOnce(&FileTypeSecret)>(&self, fnc: F) -> &Self[src]

pub fn on_secret_thumbnail<F: FnOnce(&FileTypeSecretThumbnail)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_secure<F: FnOnce(&FileTypeSecure)>(&self, fnc: F) -> &Self[src]

pub fn on_sticker<F: FnOnce(&FileTypeSticker)>(&self, fnc: F) -> &Self[src]

pub fn on_thumbnail<F: FnOnce(&FileTypeThumbnail)>(&self, fnc: F) -> &Self[src]

pub fn on_unknown<F: FnOnce(&FileTypeUnknown)>(&self, fnc: F) -> &Self[src]

pub fn on_video<F: FnOnce(&FileTypeVideo)>(&self, fnc: F) -> &Self[src]

pub fn on_video_note<F: FnOnce(&FileTypeVideoNote)>(&self, fnc: F) -> &Self[src]

pub fn on_voice_note<F: FnOnce(&FileTypeVoiceNote)>(&self, fnc: F) -> &Self[src]

pub fn on_wallpaper<F: FnOnce(&FileTypeWallpaper)>(&self, fnc: F) -> &Self[src]

pub fn as_animation(&self) -> Option<&FileTypeAnimation>[src]

pub fn as_audio(&self) -> Option<&FileTypeAudio>[src]

pub fn as_document(&self) -> Option<&FileTypeDocument>[src]

pub fn as_none(&self) -> Option<&FileTypeNone>[src]

pub fn as_photo(&self) -> Option<&FileTypePhoto>[src]

pub fn as_profile_photo(&self) -> Option<&FileTypeProfilePhoto>[src]

pub fn as_secret(&self) -> Option<&FileTypeSecret>[src]

pub fn as_secret_thumbnail(&self) -> Option<&FileTypeSecretThumbnail>[src]

pub fn as_secure(&self) -> Option<&FileTypeSecure>[src]

pub fn as_sticker(&self) -> Option<&FileTypeSticker>[src]

pub fn as_thumbnail(&self) -> Option<&FileTypeThumbnail>[src]

pub fn as_unknown(&self) -> Option<&FileTypeUnknown>[src]

pub fn as_video(&self) -> Option<&FileTypeVideo>[src]

pub fn as_video_note(&self) -> Option<&FileTypeVideoNote>[src]

pub fn as_voice_note(&self) -> Option<&FileTypeVoiceNote>[src]

pub fn as_wallpaper(&self) -> Option<&FileTypeWallpaper>[src]

pub fn animation<T: AsRef<FileTypeAnimation>>(t: T) -> Self[src]

pub fn audio<T: AsRef<FileTypeAudio>>(t: T) -> Self[src]

pub fn document<T: AsRef<FileTypeDocument>>(t: T) -> Self[src]

pub fn none<T: AsRef<FileTypeNone>>(t: T) -> Self[src]

pub fn photo<T: AsRef<FileTypePhoto>>(t: T) -> Self[src]

pub fn profile_photo<T: AsRef<FileTypeProfilePhoto>>(t: T) -> Self[src]

pub fn secret<T: AsRef<FileTypeSecret>>(t: T) -> Self[src]

pub fn secret_thumbnail<T: AsRef<FileTypeSecretThumbnail>>(t: T) -> Self[src]

pub fn secure<T: AsRef<FileTypeSecure>>(t: T) -> Self[src]

pub fn sticker<T: AsRef<FileTypeSticker>>(t: T) -> Self[src]

pub fn thumbnail<T: AsRef<FileTypeThumbnail>>(t: T) -> Self[src]

pub fn unknown<T: AsRef<FileTypeUnknown>>(t: T) -> Self[src]

pub fn video<T: AsRef<FileTypeVideo>>(t: T) -> Self[src]

pub fn video_note<T: AsRef<FileTypeVideoNote>>(t: T) -> Self[src]

pub fn voice_note<T: AsRef<FileTypeVoiceNote>>(t: T) -> Self[src]

pub fn wallpaper<T: AsRef<FileTypeWallpaper>>(t: T) -> Self[src]

Trait Implementations

impl AsRef<FileType> for FileType[src]

impl Clone for FileType[src]

impl Debug for FileType[src]

impl Default for FileType[src]

impl<'de> Deserialize<'de> for FileType[src]

impl RObject for FileType[src]

impl Serialize for FileType[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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.