pub struct User {
pub id: UserId,
pub first_name: String,
pub last_name: Option<String>,
pub username: Option<String>,
pub is_bot: bool,
pub language_code: Option<String>,
}
Expand description
This object represents a Telegram user or bot.
Fields§
§id: UserId
Unique identifier for this user or bot.
first_name: String
User‘s or bot’s first name.
last_name: Option<String>
User‘s or bot’s last name.
username: Option<String>
User‘s or bot’s username.
is_bot: bool
True, if this user is a bot.
language_code: Option<String>
IETF language tag of the user’s language
Trait Implementations§
Source§impl<'de> Deserialize<'de> for User
impl<'de> Deserialize<'de> for User
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<User, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<User, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for User
impl Ord for User
Source§impl PartialOrd for User
impl PartialOrd for User
impl Eq for User
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
Source§impl<C> CanExportChatInviteLink for Cwhere
C: ToChatRef,
impl<C> CanExportChatInviteLink for Cwhere
C: ToChatRef,
fn export_invite_link(&self) -> ExportChatInviteLink
Source§impl<C> CanGetChatAdministrators for Cwhere
C: ToChatRef,
impl<C> CanGetChatAdministrators for Cwhere
C: ToChatRef,
fn get_administrators(&self) -> GetChatAdministrators
Source§impl<C> CanGetChatMemberForChat for Cwhere
C: ToChatRef,
impl<C> CanGetChatMemberForChat for Cwhere
C: ToChatRef,
fn get_member<O>(&self, other: O) -> GetChatMemberwhere
O: ToUserId,
Source§impl<U> CanGetChatMemberForUser for Uwhere
U: ToUserId,
impl<U> CanGetChatMemberForUser for Uwhere
U: ToUserId,
fn get_member_from<O>(&self, other: O) -> GetChatMemberwhere
O: ToChatRef,
Source§impl<C> CanGetChatMembersCount for Cwhere
C: ToChatRef,
impl<C> CanGetChatMembersCount for Cwhere
C: ToChatRef,
fn get_members_count(&self) -> GetChatMembersCount
Source§impl<'b, U> CanGetUserProfilePhotos for Uwhere
U: ToUserId,
impl<'b, U> CanGetUserProfilePhotos for Uwhere
U: ToUserId,
fn get_user_profile_photos(&self) -> GetUserProfilePhotos
Source§impl<C> CanKickChatMemberForChat for Cwhere
C: ToChatRef,
impl<C> CanKickChatMemberForChat for Cwhere
C: ToChatRef,
fn kick<O>(&self, other: O) -> KickChatMemberwhere
O: ToUserId,
Source§impl<U> CanKickChatMemberForUser for Uwhere
U: ToUserId,
impl<U> CanKickChatMemberForUser for Uwhere
U: ToUserId,
fn kick_from<O>(&self, other: O) -> KickChatMemberwhere
O: ToChatRef,
Source§impl<M> CanSendAudio for Mwhere
M: ToChatRef,
impl<M> CanSendAudio for Mwhere
M: ToChatRef,
Source§impl<C> CanSendChatAction for Cwhere
C: ToChatRef,
impl<C> CanSendChatAction for Cwhere
C: ToChatRef,
fn chat_action(&self, action: ChatAction) -> SendChatAction
Source§impl<'p, 'f, 'l, C> CanSendContact<'p, 'f, 'l> for Cwhere
C: ToChatRef,
impl<'p, 'f, 'l, C> CanSendContact<'p, 'f, 'l> for Cwhere
C: ToChatRef,
Source§impl<M> CanSendDocument for Mwhere
M: ToChatRef,
impl<M> CanSendDocument for Mwhere
M: ToChatRef,
Source§impl<C> CanSendLocation for Cwhere
C: ToChatRef,
impl<C> CanSendLocation for Cwhere
C: ToChatRef,
Source§impl<C> CanSendMessage for Cwhere
C: ToChatRef,
impl<C> CanSendMessage for Cwhere
C: ToChatRef,
Source§impl<M> CanSendPhoto for Mwhere
M: ToChatRef,
impl<M> CanSendPhoto for Mwhere
M: ToChatRef,
Source§impl<C> CanSendPoll for Cwhere
C: ToChatRef,
impl<C> CanSendPoll for Cwhere
C: ToChatRef,
Source§impl<'t, 'a, 'f, C> CanSendVenue<'t, 'a, 'f> for Cwhere
C: ToChatRef,
impl<'t, 'a, 'f, C> CanSendVenue<'t, 'a, 'f> for Cwhere
C: ToChatRef,
Source§impl<M> CanSendVideo for Mwhere
M: ToChatRef,
impl<M> CanSendVideo for Mwhere
M: ToChatRef,
Source§impl<C> CanUnbanChatMemberForChat for Cwhere
C: ToChatRef,
impl<C> CanUnbanChatMemberForChat for Cwhere
C: ToChatRef,
fn unban<O>(&self, other: O) -> UnbanChatMemberwhere
O: ToUserId,
Source§impl<U> CanUnbanChatMemberForUser for Uwhere
U: ToUserId,
impl<U> CanUnbanChatMemberForUser for Uwhere
U: ToUserId,
fn unban_in<O>(&self, other: O) -> UnbanChatMemberwhere
O: ToChatRef,
Source§impl<C> CanUnpinMessage for Cwhere
C: ToChatRef,
impl<C> CanUnpinMessage for Cwhere
C: ToChatRef,
fn unpin_message(&self) -> UnpinChatMessage
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.