Enum telegram_types::bot::types::ChatType
source · 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,
}
Expand description
Type of chat
Variants
Private
Fields
first_name: String
First name of the other party in a private chat
Group
Fields
title: String
all_members_are_administrators: bool
True if a group has ‘All Members Are Admins’ enabled.
Supergroup
Fields
title: String
all_members_are_administrators: bool
True if a group has ‘All Members Are Admins’ enabled.
Channel
Fields
title: String
Unknown
Unknown upstream data type.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for ChatType
impl<'de> Deserialize<'de> for ChatType
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for ChatType
Auto Trait Implementations
impl RefUnwindSafe for ChatType
impl Send for ChatType
impl Sync for ChatType
impl Unpin for ChatType
impl UnwindSafe for ChatType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more