Enum telegram_bot::types::Chat[][src]

pub enum Chat {
    Private {
        id: Integer,
        first_name: String,
        last_name: Option<String>,
        username: Option<String>,
    },
    Group {
        id: Integer,
        title: String,
        is_supergroup: bool,
    },
    Channel {
        id: Integer,
        title: String,
        name: Option<String>,
    },
}
[]

Either a Private or a Group or a Channel. Used in "chat" field of Message. Has some useful methods for less typing.

Variants

[]

Fields of Private

[]

Fields of Group

[]

Fields of Channel

Methods

impl Chat
[src]
[]

[]

Returns the chat id, which is needed to send messages.

[]

Returns if the Chat is a User

[]

Returns if the Chat is a Group

[]

Returns if the Chat is a SuperGroup

[]

Returns if the Chat is a Channel

Trait Implementations

impl Debug for Chat
[src]
[+]

[]

Formats the value using the given formatter. Read more

impl PartialEq for Chat
[src]
[+]

[]

This method tests for self and other values to be equal, and is used by ==. Read more

[]

This method tests for !=.

impl Clone for Chat
[src]
[+]

[]

Returns a copy of the value. Read more

[]

Performs copy-assignment from source. Read more

impl Decodable for Chat
[src]
[+]

[]

Deserialize a value using a Decoder.

impl Encodable for Chat
[src]
[+]

[]

Serialize a value using an Encoder.

Auto Trait Implementations

impl Send for Chat

impl Sync for Chat