#[non_exhaustive]
pub enum Kind {
Private {
username: Option<String>,
first_name: String,
last_name: Option<String>,
bio: Option<String>,
},
Group {
title: String,
description: Option<String>,
invite_link: Option<String>,
pinned_message: Option<Box<Message>>,
permissions: Option<Permissions>,
},
Supergroup {
title: String,
username: Option<String>,
description: Option<String>,
invite_link: Option<String>,
pinned_message: Option<Box<Message>>,
slow_mode_delay: Option<u64>,
sticker_set_name: Option<String>,
can_set_sticker_set: Option<bool>,
permissions: Option<Permissions>,
location: Option<Location>,
linked_chat_id: Option<Id>,
},
Channel {
title: String,
username: Option<String>,
description: Option<String>,
invite_link: Option<String>,
pinned_message: Option<Box<Message>>,
linked_chat_id: Option<Id>,
},
}
Expand description
Represents the kind of a chat.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Private
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
The chat is private.
Group
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
permissions: Option<Permissions>
Default member permissions of the group. Returned only
in GetChat
.
The chat is a group.
Supergroup
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
slow_mode_delay: Option<u64>
The minimum allowed delay between messages in the supergroup.
Returned only in GetChat
.
§
permissions: Option<Permissions>
Default member permissions of the supergroup.
Returned only in GetChat
.
The chat is a supergroup.
Channel
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
The chat is a channel.
Implementations§
source§impl Kind
impl Kind
sourcepub fn is_private(&self) -> bool
pub fn is_private(&self) -> bool
Returns true
if self
is of variant Private
.
sourcepub fn is_supergroup(&self) -> bool
pub fn is_supergroup(&self) -> bool
Returns true
if self
is of variant Supergroup
.
sourcepub fn is_channel(&self) -> bool
pub fn is_channel(&self) -> bool
Returns true
if self
is of variant Channel
.