pub struct User { /* private fields */ }
Expand description
Represents a user
Implementations§
Source§impl User
impl User
pub fn from_json<S: AsRef<str>>(json: S) -> Result<Self>
pub fn builder() -> UserBuilder
pub fn id(&self) -> i64
pub fn first_name(&self) -> &String
pub fn last_name(&self) -> &String
pub fn username(&self) -> &String
pub fn phone_number(&self) -> &String
pub fn status(&self) -> &UserStatus
pub fn profile_photo(&self) -> &Option<ProfilePhoto>
pub fn is_contact(&self) -> bool
pub fn is_mutual_contact(&self) -> bool
pub fn is_verified(&self) -> bool
pub fn is_support(&self) -> bool
pub fn restriction_reason(&self) -> &String
pub fn is_scam(&self) -> bool
pub fn is_fake(&self) -> bool
pub fn have_access(&self) -> bool
pub fn type_(&self) -> &UserType
pub fn language_code(&self) -> &String
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
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