Enum telegram_types::bot::types::ChatType[][src]

pub enum ChatType {
    Private {
        username: Option<String>,
        first_name: String,
        last_name: Option<String>,
    },
    Group {
        title: String,
        username: Option<String>,
        all_members_are_administrators: bool,
    },
    Supergroup {
        title: String,
        username: Option<String>,
        all_members_are_administrators: bool,
        pinned_message: Option<Box<Message>>,
        sticker_set_name: Option<String>,
        can_set_sticker_set: Option<bool>,
        invite_link: Option<String>,
        description: Option<String>,
    },
    Channel {
        title: String,
        username: Option<String>,
        pinned_message: Option<Box<Message>>,
        invite_link: Option<String>,
        description: Option<String>,
    },
    Unknown,
}

Type of chat

Variants

Private

Fields of Private

username: Option<String>first_name: 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

Group

Fields of Group

title: Stringusername: Option<String>all_members_are_administrators: bool

True if a group has ‘All Members Are Admins’ enabled.

Supergroup

Fields of Supergroup

title: Stringusername: Option<String>all_members_are_administrators: bool

True if a group has ‘All Members Are Admins’ enabled.

pinned_message: Option<Box<Message>>

Pinned message. Returned only in getChat.

sticker_set_name: Option<String>

Name of group sticker set. Returned only in getChat.

can_set_sticker_set: Option<bool>

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

invite_link: Option<String>

Chat invite link/ Returned only in getChat.

description: Option<String>

Description. Returned only in getChat.

Channel

Fields of Channel

title: Stringusername: Option<String>pinned_message: Option<Box<Message>>

Pinned message. Returned only in getChat.

invite_link: Option<String>

Chat invite link. Returned only in getChat.

description: Option<String>

Description. Returned only in getChat.

Unknown

Unknown upstream data type.

Trait Implementations

impl Clone for ChatType[src]

impl Debug for ChatType[src]

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

impl PartialEq<ChatType> for ChatType[src]

impl Serialize for ChatType[src]

impl StructuralPartialEq for ChatType[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.