pub struct Dialog {
pub raw: Dialog,
pub message: Option<Message>,
pub entity: Option<User>,
pub chat: Option<Chat>,
}Expand description
A Telegram dialog (chat, user, channel).
Fields§
§raw: Dialog§message: Option<Message>§entity: Option<User>§chat: Option<Chat>Implementations§
Source§impl Dialog
impl Dialog
Sourcepub fn peer(&self) -> Option<&Peer>
pub fn peer(&self) -> Option<&Peer>
Peer of this dialog.
None for folders and for community dialogs - communities are
addressed by community_id (see dialogCommunity), not by a
Peer, since layer 228 didn’t add a corresponding Peer::Community
variant.
Sourcepub fn unread_count(&self) -> i32
pub fn unread_count(&self) -> i32
Unread message count.
Sourcepub fn top_message(&self) -> i32
pub fn top_message(&self) -> i32
ID of the top message.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dialog
impl RefUnwindSafe for Dialog
impl Send for Dialog
impl Sync for Dialog
impl Unpin for Dialog
impl UnsafeUnpin for Dialog
impl UnwindSafe for Dialog
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