Struct frankenstein::objects::Message

source ·
pub struct Message {
Show 81 fields pub message_id: i32, pub message_thread_id: Option<i32>, 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 date: u64, 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<Message>>, pub external_reply: Option<Box<ExternalReplyInfo>>, pub quote: Option<Box<TextQuote>>, pub reply_to_story: Option<Box<Story>>, pub via_bot: Option<Box<User>>, pub edit_date: Option<u64>, pub has_protected_content: Option<bool>, pub is_from_offline: 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 animation: Option<Box<Animation>>, pub audio: Option<Box<Audio>>, pub document: Option<Box<Document>>, 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 has_media_spoiler: Option<bool>, 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 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 users_shared: Option<Box<UsersShared>>, pub chat_shared: Option<Box<ChatShared>>, 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 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 video_chat_started: Option<Box<VideoChatStarted>>, pub video_chat_ended: Option<Box<VideoChatEnded>>, pub video_chat_scheduled: Option<Box<VideoChatScheduled>>, 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>§from: Option<Box<User>>§sender_chat: Option<Box<Chat>>§sender_boost_count: Option<u32>§sender_business_bot: Option<Box<User>>§date: u64§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<Message>>§external_reply: Option<Box<ExternalReplyInfo>>§quote: Option<Box<TextQuote>>§reply_to_story: Option<Box<Story>>§via_bot: Option<Box<User>>§edit_date: Option<u64>§has_protected_content: Option<bool>§is_from_offline: Option<bool>§media_group_id: Option<String>§author_signature: Option<String>§text: Option<String>§entities: Option<Vec<MessageEntity>>§link_preview_options: Option<LinkPreviewOptions>§animation: Option<Box<Animation>>§audio: Option<Box<Audio>>§document: Option<Box<Document>>§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>>§has_media_spoiler: Option<bool>§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>>§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>>§users_shared: Option<Box<UsersShared>>§chat_shared: Option<Box<ChatShared>>§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>>§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>§video_chat_started: Option<Box<VideoChatStarted>>§video_chat_ended: Option<Box<VideoChatEnded>>§video_chat_scheduled: Option<Box<VideoChatScheduled>>§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 a builder for building Message. On the builder, call .message_id(...), .message_thread_id(...)(optional), .from(...)(optional), .sender_chat(...)(optional), .sender_boost_count(...)(optional), .sender_business_bot(...)(optional), .date(...), .business_connection_id(...)(optional), .chat(...), .forward_origin(...)(optional), .is_topic_message(...)(optional), .is_automatic_forward(...)(optional), .reply_to_message(...)(optional), .external_reply(...)(optional), .quote(...)(optional), .reply_to_story(...)(optional), .via_bot(...)(optional), .edit_date(...)(optional), .has_protected_content(...)(optional), .is_from_offline(...)(optional), .media_group_id(...)(optional), .author_signature(...)(optional), .text(...)(optional), .entities(...)(optional), .link_preview_options(...)(optional), .animation(...)(optional), .audio(...)(optional), .document(...)(optional), .photo(...)(optional), .sticker(...)(optional), .story(...)(optional), .video(...)(optional), .video_note(...)(optional), .voice(...)(optional), .caption(...)(optional), .caption_entities(...)(optional), .has_media_spoiler(...)(optional), .contact(...)(optional), .dice(...)(optional), .game(...)(optional), .poll(...)(optional), .venue(...)(optional), .location(...)(optional), .new_chat_members(...)(optional), .left_chat_member(...)(optional), .new_chat_title(...)(optional), .new_chat_photo(...)(optional), .delete_chat_photo(...)(optional), .group_chat_created(...)(optional), .supergroup_chat_created(...)(optional), .channel_chat_created(...)(optional), .message_auto_delete_timer_changed(...)(optional), .migrate_to_chat_id(...)(optional), .migrate_from_chat_id(...)(optional), .pinned_message(...)(optional), .invoice(...)(optional), .successful_payment(...)(optional), .users_shared(...)(optional), .chat_shared(...)(optional), .connected_website(...)(optional), .write_access_allowed(...)(optional), .passport_data(...)(optional), .proximity_alert_triggered(...)(optional), .boost_added(...)(optional), .chat_background_set(...)(optional), .forum_topic_created(...)(optional), .forum_topic_edited(...)(optional), .forum_topic_closed(...)(optional), .forum_topic_reopened(...)(optional), .general_forum_topic_hidden(...)(optional), .general_forum_topic_unhidden(...)(optional), .giveaway_created(...)(optional), .giveaway(...)(optional), .giveaway_winners(...)(optional), .giveaway_completed(...)(optional), .video_chat_started(...)(optional), .video_chat_ended(...)(optional), .video_chat_scheduled(...)(optional), .video_chat_participants_invited(...)(optional), .web_app_data(...)(optional), .reply_markup(...)(optional) to set the values of the fields. Finally, call .build() to create the instance of Message.

Trait Implementations§

source§

impl Clone for Message

source§

fn clone(&self) -> Message

Returns a copy 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<'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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method 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> 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> ToOwned for T
where T: Clone,

§

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>,

§

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>,

§

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>,