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

pub enum FileType {
Show 16 variants 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
}
Expand description

Represents the type of a file

Variants

Animation

The file is an animation

Tuple Fields of Animation

0: FileTypeAnimation
Audio

The file is an audio file

Tuple Fields of Audio

0: FileTypeAudio
Document

The file is a document

Tuple Fields of Document

0: FileTypeDocument
None

The data is not a file

Tuple Fields of None

0: FileTypeNone
Photo

The file is a photo

Tuple Fields of Photo

0: FileTypePhoto
ProfilePhoto

The file is a profile photo

Tuple Fields of ProfilePhoto

0: FileTypeProfilePhoto
Secret

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

Tuple Fields of Secret

0: FileTypeSecret
SecretThumbnail

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

Tuple Fields of SecretThumbnail

0: FileTypeSecretThumbnail
Secure

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

Tuple Fields of Secure

0: FileTypeSecure
Sticker

The file is a sticker

Tuple Fields of Sticker

0: FileTypeSticker
Thumbnail

The file is a thumbnail of another file

Tuple Fields of Thumbnail

0: FileTypeThumbnail
Unknown

The file type is not yet known

Tuple Fields of Unknown

0: FileTypeUnknown
Video

The file is a video

Tuple Fields of Video

0: FileTypeVideo
VideoNote

The file is a video note

Tuple Fields of VideoNote

0: FileTypeVideoNote
VoiceNote

The file is a voice note

Tuple Fields of VoiceNote

0: FileTypeVoiceNote
Wallpaper

The file is a wallpaper or a background pattern

Tuple Fields of Wallpaper

0: FileTypeWallpaper

Implementations

Trait Implementations

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Return td type to json string

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.