Skip to main content

Message

Struct Message 

Source
pub struct Message {
Show 46 fields pub out: bool, pub mentioned: bool, pub media_unread: bool, pub silent: bool, pub post: bool, pub from_scheduled: bool, pub legacy: bool, pub edit_hide: bool, pub pinned: bool, pub noforwards: bool, pub invert_media: bool, pub offline: bool, pub video_processing_pending: bool, pub paid_suggested_post_stars: bool, pub paid_suggested_post_ton: bool, pub id: i32, pub from_id: Option<Peer>, pub from_boosts_applied: Option<i32>, pub peer_id: Peer, pub saved_peer_id: Option<Peer>, pub fwd_from: Option<MessageFwdHeader>, pub via_bot_id: Option<i64>, pub via_business_bot_id: Option<i64>, pub reply_to: Option<MessageReplyHeader>, pub date: i32, pub message: String, pub media: Option<MessageMedia>, pub reply_markup: Option<ReplyMarkup>, pub entities: Option<Vec<MessageEntity>>, pub views: Option<i32>, pub forwards: Option<i32>, pub replies: Option<MessageReplies>, pub edit_date: Option<i32>, pub post_author: Option<String>, pub grouped_id: Option<i64>, pub reactions: Option<MessageReactions>, pub restriction_reason: Option<Vec<RestrictionReason>>, pub ttl_period: Option<i32>, pub quick_reply_shortcut_id: Option<i32>, pub effect: Option<i64>, pub factcheck: Option<FactCheck>, pub report_delivery_until_date: Option<i32>, pub paid_message_stars: Option<i64>, pub suggested_post: Option<SuggestedPost>, pub schedule_repeat_period: Option<i32>, pub summary_from_language: Option<String>,
}
Expand description

message

Generated from:

message#9cb490e9 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true flags2:# offline:flags2.1?true video_processing_pending:flags2.4?true paid_suggested_post_stars:flags2.8?true paid_suggested_post_ton:flags2.9?true id:int from_id:flags.8?Peer from_boosts_applied:flags.29?int peer_id:Peer saved_peer_id:flags.28?Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long via_business_bot_id:flags2.0?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector<MessageEntity> views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector<RestrictionReason> ttl_period:flags.25?int quick_reply_shortcut_id:flags.30?int effect:flags2.2?long factcheck:flags2.3?FactCheck report_delivery_until_date:flags2.5?int paid_message_stars:flags2.6?long suggested_post:flags2.7?SuggestedPost schedule_repeat_period:flags2.10?int summary_from_language:flags2.11?string = Message

Fields§

§out: bool§mentioned: bool§media_unread: bool§silent: bool§post: bool§from_scheduled: bool§legacy: bool§edit_hide: bool§pinned: bool§noforwards: bool§invert_media: bool§offline: bool§video_processing_pending: bool§paid_suggested_post_stars: bool§paid_suggested_post_ton: bool§id: i32§from_id: Option<Peer>§from_boosts_applied: Option<i32>§peer_id: Peer§saved_peer_id: Option<Peer>§fwd_from: Option<MessageFwdHeader>§via_bot_id: Option<i64>§via_business_bot_id: Option<i64>§reply_to: Option<MessageReplyHeader>§date: i32§message: String§media: Option<MessageMedia>§reply_markup: Option<ReplyMarkup>§entities: Option<Vec<MessageEntity>>§views: Option<i32>§forwards: Option<i32>§replies: Option<MessageReplies>§edit_date: Option<i32>§post_author: Option<String>§grouped_id: Option<i64>§reactions: Option<MessageReactions>§restriction_reason: Option<Vec<RestrictionReason>>§ttl_period: Option<i32>§quick_reply_shortcut_id: Option<i32>§effect: Option<i64>§factcheck: Option<FactCheck>§report_delivery_until_date: Option<i32>§paid_message_stars: Option<i64>§suggested_post: Option<SuggestedPost>§schedule_repeat_period: Option<i32>§summary_from_language: Option<String>

Trait Implementations§

Source§

impl Clone for Message

Source§

fn clone(&self) -> Message

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 Message

Source§

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

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

impl Deserializable for Message

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<Message> for Message

Source§

fn from(x: Message) -> Self

Converts to this type from the input type.
Source§

impl Identifiable for Message

Source§

const CONSTRUCTOR_ID: u32 = 0x9cb490e9

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

impl PartialEq for Message

Source§

fn eq(&self, other: &Message) -> 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 Message

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<Message> for Message

Source§

type Error = Message

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

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

Performs the conversion.
Source§

impl StructuralPartialEq for Message

Auto Trait Implementations§

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.