RawChat

Struct RawChat 

Source
pub struct RawChat {
Show 17 fields pub id: i64, pub chat_type: ChatType, pub title: Option<String>, pub username: Option<String>, pub first_name: Option<String>, pub last_name: Option<String>, pub photo: Option<ChatPhoto>, pub bio: Option<String>, pub description: Option<String>, pub invite_link: Option<String>, pub pinned_message: Option<Box<RawMessage>>, pub permissions: Option<ChatPermissions>, pub slow_mode_delay: Option<usize>, pub sticker_set_name: Option<String>, pub can_set_sticker_set: Option<bool>, pub linked_chat_id: Option<i64>, pub location: Option<ChatLocation>,
}
Expand description

The raw chat, for most usages the Chat object is easier to use

Fields§

§id: i64

Unique identifier for this chat

§chat_type: ChatType§title: Option<String>

Title, for supergroups, channels and group chats

§username: Option<String>

Username, for private chats, supergroups and channels if available

§first_name: Option<String>

First name of the other party in a private chat

§last_name: Option<String>

Last name of the other party in a private chat

§photo: Option<ChatPhoto>

Chat photo. Returned only in getChat.

§bio: Option<String>

Bio of the other party in a private chat. Returned only in get_chat.

§description: Option<String>

Description, for groups, supergroups and channel chats. Returned only in get_chat.

§invite_link: Option<String>

Chat invite link, for groups, supergroups and channel chats.

§pinned_message: Option<Box<RawMessage>>

Pinned message, for groups, supergroups and channels. Returned only in get_chat.

§permissions: Option<ChatPermissions>

Default chat member permissions, for groups and supergroups. Returned only in get_chat.

§slow_mode_delay: Option<usize>

For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user. Returned only in get_chat.

§sticker_set_name: Option<String>

For supergroups, name of group sticker set. Returned only in get_chat.

§can_set_sticker_set: Option<bool>

True, if the bot can change the group sticker set. Returned only in get_chat.

§linked_chat_id: Option<i64>

Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier 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. Returned only in get_chat.

§location: Option<ChatLocation>

For supergroups, the location to which the supergroup is connected. Returned only in get_chat.

Trait Implementations§

Source§

impl Clone for RawChat

Source§

fn clone(&self) -> RawChat

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 RawChat

Source§

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

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

impl<'de> Deserialize<'de> for RawChat

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<Chat> for RawChat

Source§

fn from(chat: Chat) -> RawChat

Converts to this type from the input type.
Source§

impl From<RawChat> for Chat

Source§

fn from(raw: RawChat) -> Chat

Converts to this type from the input type.
Source§

impl PartialEq for RawChat

Source§

fn eq(&self, other: &RawChat) -> 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 RawChat

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 RawChat

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,