Skip to main content

User

Struct User 

Source
pub struct User {
Show 47 fields pub is_self: bool, pub contact: bool, pub mutual_contact: bool, pub deleted: bool, pub bot: bool, pub bot_chat_history: bool, pub bot_nochats: bool, pub verified: bool, pub restricted: bool, pub min: bool, pub bot_inline_geo: bool, pub support: bool, pub scam: bool, pub apply_min_photo: bool, pub fake: bool, pub bot_attach_menu: bool, pub premium: bool, pub attach_menu_enabled: bool, pub bot_can_edit: bool, pub close_friend: bool, pub stories_hidden: bool, pub stories_unavailable: bool, pub contact_require_premium: bool, pub bot_business: bool, pub bot_has_main_app: bool, pub bot_forum_view: bool, pub bot_forum_can_manage_topics: bool, pub id: i64, pub access_hash: Option<i64>, pub first_name: Option<String>, pub last_name: Option<String>, pub username: Option<String>, pub phone: Option<String>, pub photo: Option<UserProfilePhoto>, pub status: Option<UserStatus>, pub bot_info_version: Option<i32>, pub restriction_reason: Option<Vec<RestrictionReason>>, pub bot_inline_placeholder: Option<String>, pub lang_code: Option<String>, pub emoji_status: Option<EmojiStatus>, pub usernames: Option<Vec<Username>>, pub stories_max_id: Option<RecentStory>, pub color: Option<PeerColor>, pub profile_color: Option<PeerColor>, pub bot_active_users: Option<i32>, pub bot_verification_icon: Option<i64>, pub send_paid_messages_stars: Option<i64>,
}
Expand description

user

Generated from:

user#31774388 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true bot_attach_menu:flags.27?true premium:flags.28?true attach_menu_enabled:flags.29?true flags2:# bot_can_edit:flags2.1?true close_friend:flags2.2?true stories_hidden:flags2.3?true stories_unavailable:flags2.4?true contact_require_premium:flags2.10?true bot_business:flags2.11?true bot_has_main_app:flags2.13?true bot_forum_view:flags2.16?true bot_forum_can_manage_topics:flags2.17?true id:long access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector<RestrictionReason> bot_inline_placeholder:flags.19?string lang_code:flags.22?string emoji_status:flags.30?EmojiStatus usernames:flags2.0?Vector<Username> stories_max_id:flags2.5?RecentStory color:flags2.8?PeerColor profile_color:flags2.9?PeerColor bot_active_users:flags2.12?int bot_verification_icon:flags2.14?long send_paid_messages_stars:flags2.15?long = User

Fields§

§is_self: bool§contact: bool§mutual_contact: bool§deleted: bool§bot: bool§bot_chat_history: bool§bot_nochats: bool§verified: bool§restricted: bool§min: bool§bot_inline_geo: bool§support: bool§scam: bool§apply_min_photo: bool§fake: bool§bot_attach_menu: bool§premium: bool§attach_menu_enabled: bool§bot_can_edit: bool§close_friend: bool§stories_hidden: bool§stories_unavailable: bool§contact_require_premium: bool§bot_business: bool§bot_has_main_app: bool§bot_forum_view: bool§bot_forum_can_manage_topics: bool§id: i64§access_hash: Option<i64>§first_name: Option<String>§last_name: Option<String>§username: Option<String>§phone: Option<String>§photo: Option<UserProfilePhoto>§status: Option<UserStatus>§bot_info_version: Option<i32>§restriction_reason: Option<Vec<RestrictionReason>>§bot_inline_placeholder: Option<String>§lang_code: Option<String>§emoji_status: Option<EmojiStatus>§usernames: Option<Vec<Username>>§stories_max_id: Option<RecentStory>§color: Option<PeerColor>§profile_color: Option<PeerColor>§bot_active_users: Option<i32>§bot_verification_icon: Option<i64>§send_paid_messages_stars: Option<i64>

Trait Implementations§

Source§

impl Clone for User

Source§

fn clone(&self) -> User

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for User

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deserializable for User

Source§

fn deserialize(buf: Buffer<'_, '_>) -> Result<Self>

Read Self from buf, advancing its position.
Source§

fn from_bytes(bytes: &[u8]) -> Result<Self>

Convenience: deserialize from a byte slice.
Source§

impl From<User> for User

Source§

fn from(x: User) -> Self

Converts to this type from the input type.
Source§

impl Identifiable for User

Source§

const CONSTRUCTOR_ID: u32 = 0x31774388

The constructor ID as specified in the TL schema.
Source§

impl PartialEq for User

Source§

fn eq(&self, other: &User) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serializable for User

Source§

fn serialize(&self, buf: &mut impl Extend<u8>)

Appends the serialized form of self to buf.
Source§

fn to_bytes(&self) -> Vec<u8>

Convenience: allocate a fresh Vec<u8> and serialize into it.
Source§

impl TryFrom<User> for User

Source§

type Error = User

The type returned in the event of a conversion error.
Source§

fn try_from(v: User) -> Result<Self, Self::Error>

Performs the conversion.
Source§

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 UnsafeUnpin for User

§

impl UnwindSafe for User

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.