pub enum Message {
Empty(MessageEmpty),
Message(Message),
Service(MessageService),
}Expand description
Variants§
Implementations§
Source§impl Message
impl Message
Sourcepub fn media_unread(&self) -> Option<&bool>
pub fn media_unread(&self) -> Option<&bool>
Returns media_unread if present in this variant.
Sourcepub fn saved_peer_id(&self) -> Option<&Peer>
pub fn saved_peer_id(&self) -> Option<&Peer>
Returns saved_peer_id if present in this variant.
Sourcepub fn reply_to(&self) -> Option<&MessageReplyHeader>
pub fn reply_to(&self) -> Option<&MessageReplyHeader>
Returns reply_to if present in this variant.
Sourcepub fn reactions(&self) -> Option<&MessageReactions>
pub fn reactions(&self) -> Option<&MessageReactions>
Returns reactions if present in this variant.
Sourcepub fn ttl_period(&self) -> Option<&i32>
pub fn ttl_period(&self) -> Option<&i32>
Returns ttl_period if present in this variant.
Trait Implementations§
Source§impl Deserializable for Message
impl Deserializable for Message
Source§fn deserialize(buf: Buffer<'_, '_>) -> Result<Self>
fn deserialize(buf: Buffer<'_, '_>) -> Result<Self>
Read
Self from buf, advancing its position.Source§fn from_bytes(bytes: &[u8]) -> Result<Self>
fn from_bytes(bytes: &[u8]) -> Result<Self>
Convenience: deserialize from a byte slice.
Source§impl From<MessageEmpty> for Message
impl From<MessageEmpty> for Message
Source§fn from(x: MessageEmpty) -> Self
fn from(x: MessageEmpty) -> Self
Converts to this type from the input type.
Source§impl From<MessageService> for Message
impl From<MessageService> for Message
Source§fn from(x: MessageService) -> Self
fn from(x: MessageService) -> Self
Converts to this type from the input type.
Source§impl Serializable for Message
impl Serializable for Message
impl StructuralPartialEq for Message
Source§impl TryFrom<Message> for MessageEmpty
impl TryFrom<Message> for MessageEmpty
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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