Skip to main content

Message

Struct Message 

Source
pub struct Message {
Show 113 fields pub message_id: i32, pub message_thread_id: Option<i32>, pub direct_messages_topic: Option<Box<DirectMessagesTopic>>, pub from: Option<Box<User>>, pub sender_chat: Option<Box<Chat>>, pub sender_boost_count: Option<u32>, pub sender_business_bot: Option<Box<User>>, pub sender_tag: Option<String>, pub date: u64, pub guest_query_id: Option<String>, pub business_connection_id: Option<String>, pub chat: Box<Chat>, pub forward_origin: Option<Box<MessageOrigin>>, pub is_topic_message: Option<bool>, pub is_automatic_forward: Option<bool>, pub reply_to_message: Option<Box<Self>>, pub external_reply: Option<Box<ExternalReplyInfo>>, pub quote: Option<Box<TextQuote>>, pub reply_to_story: Option<Box<Story>>, pub reply_to_checklist_task_id: Option<i64>, pub reply_to_poll_option_id: Option<String>, pub via_bot: Option<Box<User>>, pub guest_bot_caller_user: Option<Box<User>>, pub guest_bot_caller_chat: Option<Box<Chat>>, pub edit_date: Option<u64>, pub has_protected_content: Option<bool>, pub is_from_offline: Option<bool>, pub is_paid_post: Option<bool>, pub media_group_id: Option<String>, pub author_signature: Option<String>, pub text: Option<String>, pub entities: Option<Vec<MessageEntity>>, pub link_preview_options: Option<LinkPreviewOptions>, pub suggested_post_info: Option<SuggestedPostInfo>, pub effect_id: Option<String>, pub animation: Option<Box<Animation>>, pub audio: Option<Box<Audio>>, pub document: Option<Box<Document>>, pub live_photo: Option<Box<LivePhoto>>, pub paid_media: Option<Box<PaidMediaInfo>>, pub photo: Option<Vec<PhotoSize>>, pub sticker: Option<Box<Sticker>>, pub story: Option<Box<Story>>, pub video: Option<Box<Video>>, pub video_note: Option<Box<VideoNote>>, pub voice: Option<Box<Voice>>, pub caption: Option<String>, pub caption_entities: Option<Vec<MessageEntity>>, pub show_caption_above_media: Option<bool>, pub has_media_spoiler: Option<bool>, pub checklist: Option<Checklist>, pub contact: Option<Box<Contact>>, pub dice: Option<Box<Dice>>, pub game: Option<Box<Game>>, pub poll: Option<Box<Poll>>, pub venue: Option<Box<Venue>>, pub location: Option<Box<Location>>, pub new_chat_members: Option<Vec<User>>, pub left_chat_member: Option<Box<User>>, pub chat_owner_left: Option<Box<ChatOwnerLeft>>, pub chat_owner_changed: Option<Box<ChatOwnerChanged>>, pub new_chat_title: Option<String>, pub new_chat_photo: Option<Vec<PhotoSize>>, pub delete_chat_photo: Option<bool>, pub group_chat_created: Option<bool>, pub supergroup_chat_created: Option<bool>, pub channel_chat_created: Option<bool>, pub message_auto_delete_timer_changed: Option<Box<MessageAutoDeleteTimerChanged>>, pub migrate_to_chat_id: Option<i64>, pub migrate_from_chat_id: Option<i64>, pub pinned_message: Option<Box<MaybeInaccessibleMessage>>, pub invoice: Option<Box<Invoice>>, pub successful_payment: Option<Box<SuccessfulPayment>>, pub refunded_payment: Option<Box<RefundedPayment>>, pub users_shared: Option<Box<UsersShared>>, pub chat_shared: Option<Box<ChatShared>>, pub gift: Option<GiftInfo>, pub unique_gift: Option<UniqueGiftInfo>, pub gift_upgrade_sent: Option<GiftInfo>, pub connected_website: Option<String>, pub write_access_allowed: Option<WriteAccessAllowed>, pub passport_data: Option<Box<PassportData>>, pub proximity_alert_triggered: Option<Box<ProximityAlertTriggered>>, pub boost_added: Option<Box<ChatBoostAdded>>, pub chat_background_set: Option<Box<ChatBackground>>, pub checklist_tasks_done: Option<Box<ChecklistTasksDone>>, pub checklist_tasks_added: Option<Box<ChecklistTasksAdded>>, pub direct_message_price_changed: Option<Box<DirectMessagePriceChanged>>, pub forum_topic_created: Option<Box<ForumTopicCreated>>, pub forum_topic_edited: Option<Box<ForumTopicEdited>>, pub forum_topic_closed: Option<Box<ForumTopicClosed>>, pub forum_topic_reopened: Option<Box<ForumTopicReopened>>, pub general_forum_topic_hidden: Option<Box<GeneralForumTopicHidden>>, pub general_forum_topic_unhidden: Option<Box<GeneralForumTopicUnhidden>>, pub giveaway_created: Option<GiveawayCreated>, pub giveaway: Option<Giveaway>, pub giveaway_winners: Option<GiveawayWinners>, pub giveaway_completed: Option<GiveawayCompleted>, pub managed_bot_created: Option<Box<ManagedBotCreated>>, pub paid_message_price_changed: Option<PaidMessagePriceChanged>, pub suggested_post_approved: Option<Box<SuggestedPostApproved>>, pub suggested_post_approval_failed: Option<Box<SuggestedPostApprovalFailed>>, pub suggested_post_declined: Option<Box<SuggestedPostDeclined>>, pub poll_option_added: Option<Box<PollOptionAdded>>, pub poll_option_deleted: Option<Box<PollOptionDeleted>>, pub suggested_post_paid: Option<Box<SuggestedPostPaid>>, pub suggested_post_refunded: Option<Box<SuggestedPostRefunded>>, pub video_chat_scheduled: Option<Box<VideoChatScheduled>>, pub video_chat_started: Option<Box<VideoChatStarted>>, pub video_chat_ended: Option<Box<VideoChatEnded>>, pub video_chat_participants_invited: Option<Box<VideoChatParticipantsInvited>>, pub web_app_data: Option<Box<WebAppData>>, pub reply_markup: Option<Box<InlineKeyboardMarkup>>,
}

Fields§

§message_id: i32§message_thread_id: Option<i32>§direct_messages_topic: Option<Box<DirectMessagesTopic>>§from: Option<Box<User>>§sender_chat: Option<Box<Chat>>§sender_boost_count: Option<u32>§sender_business_bot: Option<Box<User>>§sender_tag: Option<String>§date: u64§guest_query_id: Option<String>§business_connection_id: Option<String>§chat: Box<Chat>§forward_origin: Option<Box<MessageOrigin>>§is_topic_message: Option<bool>§is_automatic_forward: Option<bool>§reply_to_message: Option<Box<Self>>§external_reply: Option<Box<ExternalReplyInfo>>§quote: Option<Box<TextQuote>>§reply_to_story: Option<Box<Story>>§reply_to_checklist_task_id: Option<i64>§reply_to_poll_option_id: Option<String>§via_bot: Option<Box<User>>§guest_bot_caller_user: Option<Box<User>>§guest_bot_caller_chat: Option<Box<Chat>>§edit_date: Option<u64>§has_protected_content: Option<bool>§is_from_offline: Option<bool>§is_paid_post: Option<bool>§media_group_id: Option<String>§author_signature: Option<String>§text: Option<String>§entities: Option<Vec<MessageEntity>>§link_preview_options: Option<LinkPreviewOptions>§suggested_post_info: Option<SuggestedPostInfo>§effect_id: Option<String>§animation: Option<Box<Animation>>§audio: Option<Box<Audio>>§document: Option<Box<Document>>§live_photo: Option<Box<LivePhoto>>§paid_media: Option<Box<PaidMediaInfo>>§photo: Option<Vec<PhotoSize>>§sticker: Option<Box<Sticker>>§story: Option<Box<Story>>§video: Option<Box<Video>>§video_note: Option<Box<VideoNote>>§voice: Option<Box<Voice>>§caption: Option<String>§caption_entities: Option<Vec<MessageEntity>>§show_caption_above_media: Option<bool>§has_media_spoiler: Option<bool>§checklist: Option<Checklist>§contact: Option<Box<Contact>>§dice: Option<Box<Dice>>§game: Option<Box<Game>>§poll: Option<Box<Poll>>§venue: Option<Box<Venue>>§location: Option<Box<Location>>§new_chat_members: Option<Vec<User>>§left_chat_member: Option<Box<User>>§chat_owner_left: Option<Box<ChatOwnerLeft>>§chat_owner_changed: Option<Box<ChatOwnerChanged>>§new_chat_title: Option<String>§new_chat_photo: Option<Vec<PhotoSize>>§delete_chat_photo: Option<bool>§group_chat_created: Option<bool>§supergroup_chat_created: Option<bool>§channel_chat_created: Option<bool>§message_auto_delete_timer_changed: Option<Box<MessageAutoDeleteTimerChanged>>§migrate_to_chat_id: Option<i64>§migrate_from_chat_id: Option<i64>§pinned_message: Option<Box<MaybeInaccessibleMessage>>§invoice: Option<Box<Invoice>>§successful_payment: Option<Box<SuccessfulPayment>>§refunded_payment: Option<Box<RefundedPayment>>§users_shared: Option<Box<UsersShared>>§chat_shared: Option<Box<ChatShared>>§gift: Option<GiftInfo>§unique_gift: Option<UniqueGiftInfo>§gift_upgrade_sent: Option<GiftInfo>§connected_website: Option<String>§write_access_allowed: Option<WriteAccessAllowed>§passport_data: Option<Box<PassportData>>§proximity_alert_triggered: Option<Box<ProximityAlertTriggered>>§boost_added: Option<Box<ChatBoostAdded>>§chat_background_set: Option<Box<ChatBackground>>§checklist_tasks_done: Option<Box<ChecklistTasksDone>>§checklist_tasks_added: Option<Box<ChecklistTasksAdded>>§direct_message_price_changed: Option<Box<DirectMessagePriceChanged>>§forum_topic_created: Option<Box<ForumTopicCreated>>§forum_topic_edited: Option<Box<ForumTopicEdited>>§forum_topic_closed: Option<Box<ForumTopicClosed>>§forum_topic_reopened: Option<Box<ForumTopicReopened>>§general_forum_topic_hidden: Option<Box<GeneralForumTopicHidden>>§general_forum_topic_unhidden: Option<Box<GeneralForumTopicUnhidden>>§giveaway_created: Option<GiveawayCreated>§giveaway: Option<Giveaway>§giveaway_winners: Option<GiveawayWinners>§giveaway_completed: Option<GiveawayCompleted>§managed_bot_created: Option<Box<ManagedBotCreated>>§paid_message_price_changed: Option<PaidMessagePriceChanged>§suggested_post_approved: Option<Box<SuggestedPostApproved>>§suggested_post_approval_failed: Option<Box<SuggestedPostApprovalFailed>>§suggested_post_declined: Option<Box<SuggestedPostDeclined>>§poll_option_added: Option<Box<PollOptionAdded>>§poll_option_deleted: Option<Box<PollOptionDeleted>>§suggested_post_paid: Option<Box<SuggestedPostPaid>>§suggested_post_refunded: Option<Box<SuggestedPostRefunded>>§video_chat_scheduled: Option<Box<VideoChatScheduled>>§video_chat_started: Option<Box<VideoChatStarted>>§video_chat_ended: Option<Box<VideoChatEnded>>§video_chat_participants_invited: Option<Box<VideoChatParticipantsInvited>>§web_app_data: Option<Box<WebAppData>>§reply_markup: Option<Box<InlineKeyboardMarkup>>

Implementations§

Source§

impl Message

Source

pub fn builder() -> MessageBuilder

Create an instance of Message using the builder syntax

Trait Implementations§

Source§

impl Clone for Message

Source§

fn clone(&self) -> Message

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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<'de> Deserialize<'de> for Message

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
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 (const: unstable) · 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 Serialize for Message

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,