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)

Tuple Fields

The file is an animation

Audio(FileTypeAudio)

Tuple Fields

The file is an audio file

Document(FileTypeDocument)

Tuple Fields

The file is a document

None(FileTypeNone)

Tuple Fields

The data is not a file

Photo(FileTypePhoto)

Tuple Fields

The file is a photo

ProfilePhoto(FileTypeProfilePhoto)

Tuple Fields

The file is a profile photo

Secret(FileTypeSecret)

Tuple Fields

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

SecretThumbnail(FileTypeSecretThumbnail)

Tuple Fields

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

Secure(FileTypeSecure)

Tuple Fields

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

Sticker(FileTypeSticker)

Tuple Fields

The file is a sticker

Thumbnail(FileTypeThumbnail)

Tuple Fields

The file is a thumbnail of another file

Unknown(FileTypeUnknown)

Tuple Fields

The file type is not yet known

Video(FileTypeVideo)

Tuple Fields

The file is a video

VideoNote(FileTypeVideoNote)

Tuple Fields

The file is a video note

VoiceNote(FileTypeVoiceNote)

Tuple Fields

The file is a voice note

Wallpaper(FileTypeWallpaper)

Tuple Fields

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.