Struct teloxide::types::Message[][src]

pub struct Message {
    pub id: i32,
    pub date: i32,
    pub chat: Chat,
    pub via_bot: Option<User>,
    pub kind: MessageKind,
}

This object represents a message.

The official docs.

Fields

id: i32

Unique message identifier inside this chat.

date: i32

Date the message was sent in Unix time.

chat: Chat

Conversation the message belongs to.

via_bot: Option<User>

Bot through which the message was sent.

kind: MessageKind

Implementations

impl Message[src]

Getters for Message fields from telegram docs.

pub fn from(&self) -> Option<&User>[src]

pub fn author_signature(&self) -> Option<&str>[src]

pub fn sender_chat(&self) -> Option<&Chat>[src]

pub fn chat_id(&self) -> i64[src]

pub fn forward_from(&self) -> Option<&ForwardedFrom>[src]

NOTE: this is getter for both forward_from and forward_sender_name

pub fn forward_from_chat(&self) -> Option<&Chat>[src]

pub fn forward_from_message_id(&self) -> Option<&i32>[src]

pub fn forward_signature(&self) -> Option<&str>[src]

pub fn forward_date(&self) -> Option<&i32>[src]

pub fn reply_to_message(&self) -> Option<&Message>[src]

pub fn edit_date(&self) -> Option<&i32>[src]

pub fn media_group_id(&self) -> Option<&str>[src]

pub fn text(&self) -> Option<&str>[src]

pub fn entities(&self) -> Option<&[MessageEntity]>[src]

pub fn caption_entities(&self) -> Option<&[MessageEntity]>[src]

pub fn audio(&self) -> Option<&Audio>[src]

pub fn document(&self) -> Option<&Document>[src]

pub fn animation(&self) -> Option<&Animation>[src]

pub fn game(&self) -> Option<&Game>[src]

pub fn photo(&self) -> Option<&[PhotoSize]>[src]

pub fn sticker(&self) -> Option<&Sticker>[src]

pub fn video(&self) -> Option<&Video>[src]

pub fn voice(&self) -> Option<&Voice>[src]

pub fn video_note(&self) -> Option<&VideoNote>[src]

pub fn caption(&self) -> Option<&str>[src]

pub fn contact(&self) -> Option<&Contact>[src]

pub fn location(&self) -> Option<&Location>[src]

pub fn venue(&self) -> Option<&Venue>[src]

pub fn poll(&self) -> Option<&Poll>[src]

pub fn new_chat_members(&self) -> Option<&[User]>[src]

pub fn left_chat_member(&self) -> Option<&User>[src]

pub fn new_chat_title(&self) -> Option<&str>[src]

pub fn new_chat_photo(&self) -> Option<&[PhotoSize]>[src]

pub fn delete_chat_photo(&self) -> Option<True>[src]

pub fn group_chat_created(&self) -> Option<True>[src]

pub fn super_group_chat_created(&self) -> Option<True>[src]

pub fn channel_chat_created(&self) -> Option<True>[src]

pub fn migrate_to_chat_id(&self) -> Option<i64>[src]

pub fn migrate_from_chat_id(&self) -> Option<i64>[src]

pub fn pinned_message(&self) -> Option<&Message>[src]

pub fn invoice(&self) -> Option<&Invoice>[src]

pub fn successful_payment(&self) -> Option<&SuccessfulPayment>[src]

pub fn connected_website(&self) -> Option<&str>[src]

pub fn passport_data(&self) -> Option<&PassportData>[src]

pub fn dice(&self) -> Option<&Dice>[src]

pub fn proximity_alert_triggered(&self) -> Option<&ProximityAlertTriggered>[src]

pub fn reply_markup(&self) -> Option<&InlineKeyboardMarkup>[src]

impl Message[src]

pub fn url(&self) -> Option<Url>[src]

Trait Implementations

impl Clone for Message[src]

impl Debug for Message[src]

impl<'de> Deserialize<'de> for Message[src]

impl GetChatId for Message[src]

impl PartialEq<Message> for Message[src]

impl Serialize for Message[src]

impl StructuralPartialEq for Message[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<Choices> CoproductSubsetter<CNil, HNil> for Choices

type Remainder = Choices

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

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U, I> LiftInto<U, I> for T where
    U: LiftFrom<T, I>, 

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<Source> Sculptor<HNil, HNil> for Source

type Remainder = Source

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.