[−][src]Struct actix_telegram::types::Message
This object represents a message.
Methods
impl Message
[src]
impl Message
pub fn message_id(&self) -> &Integer | [src] |
Unique message identifier inside this chat
pub fn from(&self) -> &Option<User> | [src] |
Sender, empty for messages sent to channels
pub fn date(&self) -> &Integer | [src] |
Date the message was sent in Unix time
pub fn chat(&self) -> &Chat | [src] |
Conversation the message belongs to
pub fn forward_from(&self) -> &Option<User> | [src] |
For forwarded messages, sender of the original message
pub fn forward_from_chat(&self) -> &Option<Chat> | [src] |
For messages forwarded from channels, information about the original channel
pub fn forward_from_message_id(&self) -> &Option<Integer> | [src] |
For messages forwarded from channels, identifier of the original message in the channel
pub fn forward_signature(&self) -> &Option<String> | [src] |
For messages forwarded from channels, signature of the post author if present
pub fn forward_date(&self) -> &Option<Integer> | [src] |
For forwarded messages, date the original message was sent in Unix time
pub fn reply_to_message(&self) -> &Option<Box<Message>> | [src] |
For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.
pub fn edit_date(&self) -> &Option<Integer> | [src] |
Date the message was last edited in Unix time
pub fn media_group_id(&self) -> &Option<String> | [src] |
The unique identifier of a media message group this message belongs to
pub fn author_signature(&self) -> &Option<String> | [src] |
Signature of the post author for messages in channels
pub fn text(&self) -> &Option<String> | [src] |
For text messages, the actual UTF-8 text of the message, 0-4096 characters.
pub fn entities(&self) -> &Option<Vec<MessageEntity>> | [src] |
For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text
pub fn caption_entities(&self) -> &Option<Vec<MessageEntity>> | [src] |
For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption
pub fn audio(&self) -> &Option<Audio> | [src] |
Message is an audio file, information about the file
pub fn document(&self) -> &Option<Document> | [src] |
Message is a general file, information about the file
pub fn animation(&self) -> &Option<Animation> | [src] |
Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set
pub fn game(&self) -> &Option<Game> | [src] |
Message is a game, information about the game. More about games »
pub fn photo(&self) -> &Option<Vec<PhotoSize>> | [src] |
Message is a photo, available sizes of the photo
pub fn sticker(&self) -> &Option<Sticker> | [src] |
Message is a sticker, information about the sticker
pub fn video(&self) -> &Option<Video> | [src] |
Message is a video, information about the video
pub fn voice(&self) -> &Option<Voice> | [src] |
Message is a voice message, information about the file
pub fn video_note(&self) -> &Option<VideoNote> | [src] |
Message is a video note, information about the video message
pub fn caption(&self) -> &Option<String> | [src] |
Caption for the audio, document, photo, video or voice, 0-200 characters
pub fn contact(&self) -> &Option<Contact> | [src] |
Message is a shared contact, information about the contact
pub fn location(&self) -> &Option<Location> | [src] |
Message is a shared location, information about the location
pub fn venue(&self) -> &Option<Venue> | [src] |
Message is a venue, information about the venue
pub fn new_chat_members(&self) -> &Option<Vec<User>> | [src] |
New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)
pub fn left_chat_member(&self) -> &Option<User> | [src] |
A member was removed from the group, information about them (this member may be the bot itself)
pub fn new_chat_title(&self) -> &Option<String> | [src] |
A chat title was changed to this value
pub fn new_chat_photo(&self) -> &Option<Vec<PhotoSize>> | [src] |
A chat photo was change to this value
pub fn delete_chat_photo(&self) -> &Option<True> | [src] |
Service message: the chat photo was deleted
pub fn group_chat_created(&self) -> &Option<True> | [src] |
Service message: the group has been created
pub fn supergroup_chat_created(&self) -> &Option<True> | [src] |
Service message: the supergroup has been created. This field can‘t be received in a message coming through updates, because bot can’t be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.
pub fn channel_chat_created(&self) -> &Option<True> | [src] |
Service message: the channel has been created. This field can‘t be received in a message coming through updates, because bot can’t be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.
pub fn migrate_to_chat_id(&self) -> &Option<Integer> | [src] |
The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
pub fn migrate_from_chat_id(&self) -> &Option<Integer> | [src] |
The supergroup has been migrated from a group with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
pub fn pinned_message(&self) -> &Option<Box<Message>> | [src] |
Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.
pub fn invoice(&self) -> &Option<Invoice> | [src] |
Message is an invoice for a payment, information about the invoice. More about payments »
pub fn successful_payment(&self) -> &Option<SuccessfulPayment> | [src] |
Message is a service message about a successful payment, information about the payment. More about payments »
pub fn connected_website(&self) -> &Option<String> | [src] |
The domain name of the website on which the user has logged in. More about Telegram Login »
pub fn passport_data(&self) -> &Option<PassportData> | [src] |
Telegram Passport data
Trait Implementations
impl Clone for Message
[src]
impl Clone for Message
fn clone(&self) -> Message | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
impl Debug for Message
[src]
impl Debug for Message
impl<'de> Deserialize<'de> for Message
[src]
impl<'de> Deserialize<'de> for Message
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where | [src] |
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> Erased for T
impl<T> Erased for T
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,