pub struct UserFull { /* private fields */ }Expand description
Typed wrapper over tl::enums::users::UserFull, the response of
Client::get_user_full.
The bare userFull constructor doesn’t carry the account’s name,
username, or online status - those live on the User object that
Telegram returns alongside it in the same response. This wrapper keeps
both together so callers can read status without a follow-up
users.getUsers round-trip.
Implementations§
Source§impl UserFull
impl UserFull
Sourcepub fn common_chats_count(&self) -> i32
pub fn common_chats_count(&self) -> i32
Number of chats this user has in common with the current account.
Sourcepub fn phone_calls_available(&self) -> bool
pub fn phone_calls_available(&self) -> bool
true if voice/video calls are available with this user.
Sourcepub fn phone_calls_private(&self) -> bool
pub fn phone_calls_private(&self) -> bool
true if this user’s phone calls are set to private.
Sourcepub fn user(&self) -> Option<User>
pub fn user(&self) -> Option<User>
The User object for the requested user - name, username, status,
etc. - taken from this same response, no extra RPC required.
Sourcepub fn status(&self) -> Option<UserStatus>
pub fn status(&self) -> Option<UserStatus>
Shortcut for the requested user’s current online/offline status.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UserFull
impl RefUnwindSafe for UserFull
impl Send for UserFull
impl Sync for UserFull
impl Unpin for UserFull
impl UnsafeUnpin for UserFull
impl UnwindSafe for UserFull
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more