Module telegram_bot::types[][src]

Types of the Telegram API.

This module contains definitions of the types defined here. Many Telegram types, like "Location", map directly to Rust-structs. Other Telegram types, like "Message", was made more rusty by using enums.

All types implement Decodable and Encodable, so they can be serialized as JSON. Non existing JSON-fields will result in None values for Option types. None values don't result in JSON fields.

Structs

Audio

Telegram type "Audio" (directly mapped)

Contact

Telegram type "Contact" (directly mapped)

Document

Telegram type "Document" (directly mapped)

GroupToSuperGroupMigration
Location

Telegram type "Location" (directly mapped)

Message
PhotoSize

Telegram type "PhotoSize" (directly mapped)

ReplyKeyboardMarkup

Telegram type "ReplyKeyboardMarkup" (directly mapped)

Response

All API responses are from this type. Mostly used internal.

Sticker

Telegram type "Sticker" (directly mapped)

Update

Telegram type "Update" (directly mapped)

User

Telegram type "User" (directly mapped)

UserProfilePhotos

Telegram type "UserProfilePhotos" (directly mapped)

Video

Telegram type "Video" (directly mapped)

Voice

Telegram type "Voice" (directly mapped)

Enums

Chat

Either a Private or a Group or a Channel. Used in "chat" field of Message. Has some useful methods for less typing.

ChatAction

Strongly typed ChatAction. Instead of passing a String to the send_chat_action method, this is used.

MessageType
ParseMode

Strongly typed ParseMode. Instead of passing a String to the send_message method, this is used.

ReplyMarkup

Represents one of "ReplyKeyboardMarkup", "ReplyKeyboardHide" or "ForceReply". Used for the "reply_markup" field.

Type Definitions

Float

The Telegram "Float": Currently f32.

Integer

The Telegram "Integer": Currently i64.