RawMessage

Struct RawMessage 

Source
pub struct RawMessage {
Show 56 fields pub message_id: i64, pub from: Option<User>, pub sender_chat: Option<RawChat>, pub date: DateTime<Utc>, pub chat: RawChat, pub forward_from: Option<User>, pub forward_from_chat: Option<RawChat>, pub forward_from_message_id: Option<i64>, pub forward_signature: Option<String>, pub forward_sender_name: Option<String>, pub forward_date: Option<DateTime<Utc>>, pub reply_to_message: Option<Box<RawMessage>>, pub via_bot: Option<User>, pub edit_date: Option<DateTime<Utc>>, pub media_group_id: Option<String>, pub author_signature: Option<String>, pub text: Option<String>, pub entities: Option<Vec<MessageEntity>>, pub caption_entities: Option<Vec<MessageEntity>>, pub audio: Option<Audio>, pub document: Option<Document>, pub animation: Option<Animation>, pub game: Option<Game>, pub photo: Option<Vec<PhotoSize>>, pub sticker: Option<Sticker>, pub video: Option<Video>, pub voice: Option<Voice>, pub video_note: Option<VideoNote>, pub caption: Option<String>, pub contact: Option<Contact>, pub location: Option<Location>, pub venue: Option<Venue>, pub poll: Option<Poll>, pub dice: Option<Dice>, 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: bool, pub group_chat_created: bool, pub supergroup_chat_created: bool, pub channel_chat_created: 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<RawMessage>>, 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 reply_markup: Option<InlineKeyboardMarkup>, pub voice_chat_scheduled: Option<VoiceChatScheduled>, pub voice_chat_started: Option<VoiceChatStarted>, pub voice_chat_ended: Option<VoiceChatEnded>, pub voice_chat_participants_invited: Option<VoiceChatParticipantsInvited>,
}
Expand description

The raw message, for most usages the Message object is easier to use

Fields§

§message_id: i64§from: Option<User>§sender_chat: Option<RawChat>§date: DateTime<Utc>§chat: RawChat§forward_from: Option<User>§forward_from_chat: Option<RawChat>§forward_from_message_id: Option<i64>§forward_signature: Option<String>§forward_sender_name: Option<String>§forward_date: Option<DateTime<Utc>>§reply_to_message: Option<Box<RawMessage>>§via_bot: Option<User>§edit_date: Option<DateTime<Utc>>§media_group_id: Option<String>§author_signature: Option<String>§text: Option<String>§entities: Option<Vec<MessageEntity>>§caption_entities: Option<Vec<MessageEntity>>§audio: Option<Audio>§document: Option<Document>§animation: Option<Animation>§game: Option<Game>§photo: Option<Vec<PhotoSize>>§sticker: Option<Sticker>§video: Option<Video>§voice: Option<Voice>§video_note: Option<VideoNote>§caption: Option<String>§contact: Option<Contact>§location: Option<Location>§venue: Option<Venue>§poll: Option<Poll>§dice: Option<Dice>§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: bool§group_chat_created: bool§supergroup_chat_created: bool§channel_chat_created: bool§message_auto_delete_timer_changed: Option<MessageAutoDeleteTimerChanged>§migrate_to_chat_id: Option<i64>§migrate_from_chat_id: Option<i64>§pinned_message: Option<Box<RawMessage>>§invoice: Option<Invoice>§successful_payment: Option<SuccessfulPayment>§connected_website: Option<String>§passport_data: Option<PassportData>§proximity_alert_triggered: Option<ProximityAlertTriggered>§reply_markup: Option<InlineKeyboardMarkup>§voice_chat_scheduled: Option<VoiceChatScheduled>§voice_chat_started: Option<VoiceChatStarted>§voice_chat_ended: Option<VoiceChatEnded>§voice_chat_participants_invited: Option<VoiceChatParticipantsInvited>

Trait Implementations§

Source§

impl Clone for RawMessage

Source§

fn clone(&self) -> RawMessage

Returns a duplicate 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 RawMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for RawMessage

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 From<Message> for RawMessage

Source§

fn from(message: Message) -> RawMessage

Converts to this type from the input type.
Source§

impl From<RawMessage> for Message

Source§

fn from(raw: RawMessage) -> Message

Converts to this type from the input type.
Source§

impl PartialEq for RawMessage

Source§

fn eq(&self, other: &RawMessage) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 RawMessage

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 RawMessage

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> CloneAny for T
where T: Any + Clone,

Source§

fn clone_any(&self) -> Box<dyn CloneAny>

Source§

fn clone_any_send(&self) -> Box<dyn CloneAny + Send>
where T: Send,

Source§

fn clone_any_sync(&self) -> Box<dyn CloneAny + Sync>
where T: Sync,

Source§

fn clone_any_send_sync(&self) -> Box<dyn CloneAny + Send + Sync>
where T: Send + Sync,

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> 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<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> DebugAny for T
where T: Any + Debug,

Source§

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

Source§

impl<T> UnsafeAny for T
where T: Any,