[−][src]Enum rtdlib::types::FileType
Represents the type of a file
Variants
Animation(FileTypeAnimation)
The file is an animation
Audio(FileTypeAudio)
The file is an audio file
Document(FileTypeDocument)
The file is a document
None(FileTypeNone)
The data is not a file
Photo(FileTypePhoto)
The file is a photo
ProfilePhoto(FileTypeProfilePhoto)
The file is a profile photo
Secret(FileTypeSecret)
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
Secure(FileTypeSecure)
The file is a file from Secure storage used for storing Telegram Passport files
Sticker(FileTypeSticker)
The file is a sticker
Thumbnail(FileTypeThumbnail)
The file is a thumbnail of another file
Unknown(FileTypeUnknown)
The file type is not yet known
Video(FileTypeVideo)
The file is a video
VideoNote(FileTypeVideoNote)
The file is a video note
VoiceNote(FileTypeVoiceNote)
The file is a voice note
Wallpaper(FileTypeWallpaper)
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]
&self,
fnc: F
) -> &Self
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]
&self,
fnc: F
) -> &Self
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]
fn deserialize<D>(deserializer: D) -> Result<FileType, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl RObject for FileType
[src]
impl Serialize for FileType
[src]
Auto Trait Implementations
impl RefUnwindSafe for FileType
impl Send for FileType
impl Sync for FileType
impl Unpin for FileType
impl UnwindSafe for FileType
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,