pub struct User {
    pub id: i64,
    pub is_bot: bool,
    pub first_name: String,
    pub last_name: Option<String>,
    pub username: Option<String>,
    pub language_code: Option<String>,
    pub is_premium: Option<bool>,
    pub added_to_attachment_menu: Option<bool>,
    pub can_join_groups: Option<bool>,
    pub can_read_all_group_messages: Option<bool>,
    pub supports_inline_queries: Option<bool>,
}
Expand description

This object represents a Telegram user or bot.

Fields

id: i64

Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.

is_bot: bool

True, if this user is a bot

first_name: String

User’s or bot’s first name

last_name: Option<String>

Optional. User’s or bot’s last name

username: Option<String>

Optional. User’s or bot’s username

language_code: Option<String>

Optional. IETF language tag of the user’s language

is_premium: Option<bool>

Optional. True, if this user is a Telegram Premium user

added_to_attachment_menu: Option<bool>

Optional. True, if this user added the bot to the attachment menu

can_join_groups: Option<bool>

Optional. True, if the bot can be invited to groups. Returned only in getMe.

can_read_all_group_messages: Option<bool>

Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.

supports_inline_queries: Option<bool>

Optional. True, if the bot supports inline queries. Returned only in getMe.

Implementations

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
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

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more