Struct frankenstein::objects::Message
source · [−]pub struct Message {Show 59 fields
pub message_id: i32,
pub from: Option<User>,
pub sender_chat: Option<Chat>,
pub date: u64,
pub chat: Chat,
pub forward_from: Option<User>,
pub forward_from_chat: Option<Chat>,
pub forward_from_message_id: Option<i32>,
pub forward_signature: Option<String>,
pub forward_sender_name: Option<String>,
pub forward_date: Option<u64>,
pub is_automatic_forward: Option<bool>,
pub reply_to_message: Option<Box<Message>>,
pub via_bot: Option<User>,
pub edit_date: Option<u64>,
pub has_protected_content: Option<bool>,
pub media_group_id: Option<String>,
pub author_signature: Option<String>,
pub text: Option<String>,
pub entities: Option<Vec<MessageEntity>>,
pub animation: Option<Animation>,
pub audio: Option<Audio>,
pub document: Option<Document>,
pub photo: Option<Vec<PhotoSize>>,
pub sticker: Option<Sticker>,
pub video: Option<Video>,
pub video_note: Option<VideoNote>,
pub voice: Option<Voice>,
pub caption: Option<String>,
pub caption_entities: Option<Vec<MessageEntity>>,
pub contact: Option<Contact>,
pub dice: Option<Dice>,
pub game: Option<Game>,
pub poll: Option<Poll>,
pub venue: Option<Venue>,
pub location: Option<Location>,
pub new_chat_members: Option<Vec<User>>,
pub left_chat_member: Option<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<MessageAutoDeleteTimerChanged>,
pub migrate_to_chat_id: Option<i64>,
pub migrate_from_chat_id: Option<i64>,
pub pinned_message: Option<Box<Message>>,
pub invoice: Option<Invoice>,
pub successful_payment: Option<SuccessfulPayment>,
pub connected_website: Option<String>,
pub passport_data: Option<PassportData>,
pub proximity_alert_triggered: Option<ProximityAlertTriggered>,
pub video_chat_started: Option<VideoChatStarted>,
pub video_chat_ended: Option<VideoChatEnded>,
pub video_chat_scheduled: Option<VideoChatScheduled>,
pub video_chat_participants_invited: Option<VideoChatParticipantsInvited>,
pub web_app_data: Option<WebAppData>,
pub reply_markup: Option<InlineKeyboardMarkup>,
}
Fields
message_id: i32
from: Option<User>
sender_chat: Option<Chat>
date: u64
chat: Chat
forward_from: Option<User>
forward_from_chat: Option<Chat>
forward_from_message_id: Option<i32>
forward_signature: Option<String>
forward_sender_name: Option<String>
forward_date: Option<u64>
is_automatic_forward: Option<bool>
reply_to_message: Option<Box<Message>>
via_bot: Option<User>
edit_date: Option<u64>
has_protected_content: Option<bool>
media_group_id: Option<String>
text: Option<String>
entities: Option<Vec<MessageEntity>>
animation: Option<Animation>
audio: Option<Audio>
document: Option<Document>
photo: Option<Vec<PhotoSize>>
sticker: Option<Sticker>
video: Option<Video>
video_note: Option<VideoNote>
voice: Option<Voice>
contact: Option<Contact>
dice: Option<Dice>
game: Option<Game>
poll: Option<Poll>
venue: Option<Venue>
location: Option<Location>
new_chat_members: Option<Vec<User>>
left_chat_member: Option<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<MessageAutoDeleteTimerChanged>
migrate_to_chat_id: Option<i64>
migrate_from_chat_id: Option<i64>
pinned_message: Option<Box<Message>>
invoice: Option<Invoice>
successful_payment: Option<SuccessfulPayment>
connected_website: Option<String>
passport_data: Option<PassportData>
proximity_alert_triggered: Option<ProximityAlertTriggered>
video_chat_started: Option<VideoChatStarted>
video_chat_ended: Option<VideoChatEnded>
video_chat_scheduled: Option<VideoChatScheduled>
video_chat_participants_invited: Option<VideoChatParticipantsInvited>
web_app_data: Option<WebAppData>
reply_markup: Option<InlineKeyboardMarkup>
Implementations
sourceimpl Message
impl Message
sourcepub fn builder(
) -> MessageBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder(
) -> MessageBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building Message
.
On the builder, call .message_id(...)
, .from(...)
(optional), .sender_chat(...)
(optional), .date(...)
, .chat(...)
, .forward_from(...)
(optional), .forward_from_chat(...)
(optional), .forward_from_message_id(...)
(optional), .forward_signature(...)
(optional), .forward_sender_name(...)
(optional), .forward_date(...)
(optional), .is_automatic_forward(...)
(optional), .reply_to_message(...)
(optional), .via_bot(...)
(optional), .edit_date(...)
(optional), .has_protected_content(...)
(optional), .media_group_id(...)
(optional), .author_signature(...)
(optional), .text(...)
(optional), .entities(...)
(optional), .animation(...)
(optional), .audio(...)
(optional), .document(...)
(optional), .photo(...)
(optional), .sticker(...)
(optional), .video(...)
(optional), .video_note(...)
(optional), .voice(...)
(optional), .caption(...)
(optional), .caption_entities(...)
(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), .connected_website(...)
(optional), .passport_data(...)
(optional), .proximity_alert_triggered(...)
(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
sourceimpl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Message
Auto Trait Implementations
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more