pub struct User {
pub added_to_attachment_menu: Option<bool>,
pub allows_write_to_pm: Option<bool>,
pub is_premium: Option<bool>,
pub first_name: String,
pub id: i64,
pub is_bot: Option<bool>,
pub last_name: Option<String>,
pub language_code: Option<String>,
pub photo_url: Option<String>,
pub username: Option<String>,
}
Expand description
Describes user information: https://docs.telegram-mini-apps.com/launch-parameters/init-data#user
Fields§
True, if this user added the bot to the attachment menu.
allows_write_to_pm: Option<bool>
True, if this user allowed the bot to message them.
Has the user purchased Telegram Premium.
first_name: String
Bot or user name.
id: i64
Bot or user ID.
is_bot: Option<bool>
Is the user a bot.
last_name: Option<String>
User’s last name.
language_code: Option<String>
IETF user’s language.
photo_url: Option<String>
Link to the user’s or bot’s photo. Photos can have formats .jpeg
and .svg
.
It is returned only for Mini Apps opened through the attachment menu.
username: Option<String>
Login of the bot or user.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for User
impl<'de> Deserialize<'de> for User
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for User
Auto Trait Implementations§
impl Freeze for User
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnwindSafe for User
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more