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(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

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)

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.