[][src]Enum tbot::types::chat::Kind

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

Represents the kind of a chat.

Variants

Private

The chat is private.

Fields of Private

username: Option<String>

The username of the user.

first_name: String

The first name of the user.

last_name: Option<String>

The last name of the user.

Group

The chat is a group.

Fields of Group

title: String

The title of the group.

all_members_are_administrators: bool

true if all membmers of this group have admin rights.

pinned_message: Option<Box<Message>>

The pinned message of the group.

Supergroup

The chat is a supergroup.

Fields of Supergroup

title: String

The title of the supergroup.

username: Option<String>

The username of the supergroup.

description: Option<String>

The description of the supergroup.

invite_link: Option<String>

The invite link of the supergroup.

pinned_message: Option<Box<Message>>

The pinned message of the supergroup.

sticker_set_name: Option<String>

The name of the sticker set of the supergroup.

can_set_sticker_set: Option<bool>

true if the bot can set the sticker set of the supergroup.

Channel

The chat is a channel.

Fields of Channel

title: String

The title of the channel.

username: Option<String>

The username of the channel.

description: Option<String>

The description of the channel.

invite_link: Option<String>

The invite link of the channel.

pinned_message: Option<Box<Message>>

The pinned message of the channel.

Methods

impl Kind[src]

pub fn is_private(&self) -> bool[src]

Checks if self is Private.

pub fn is_group(&self) -> bool[src]

Checks if self is Group.

pub fn is_supergroup(&self) -> bool[src]

Checks if self is Supergroup.

pub fn is_channel(&self) -> bool[src]

Checks if self is Channel.

Trait Implementations

impl PartialEq<Kind> for Kind[src]

impl Clone for Kind[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Kind[src]

Auto Trait Implementations

impl Send for Kind

impl Unpin for Kind

impl Sync for Kind

impl UnwindSafe for Kind

impl RefUnwindSafe for Kind

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

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

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

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

impl<T> Erased for T