Enum telegram_bot::types::Chat [−][src]
Either a Private or a Group or a Channel. Used in "chat" field of Message. Has some useful methods for less typing.
Variants
Private
Fields of Private
id: Integer | |
first_name: String | |
last_name: Option<String> | |
username: Option<String> |
Group
Fields of Group
id: Integer | |
title: String | |
is_supergroup: bool |
Channel
Fields of Channel
id: Integer | |
title: String | |
name: Option<String> |
Methods
impl Chat
[src]
[−]
impl Chat
pub fn id(&self) -> Integer
[src]
[−]
pub fn id(&self) -> Integer
Returns the chat id, which is needed to send messages.
pub fn is_user(&self) -> bool
[src]
[−]
pub fn is_user(&self) -> bool
Returns if the Chat is a User
pub fn is_group(&self) -> bool
[src]
[−]
pub fn is_group(&self) -> bool
Returns if the Chat is a Group
pub fn is_supergroup(&self) -> bool
[src]
[−]
pub fn is_supergroup(&self) -> bool
Returns if the Chat is a SuperGroup
pub fn is_channel(&self) -> bool
[src]
[−]
pub fn is_channel(&self) -> bool
Returns if the Chat is a Channel
pub fn to_user(&self) -> Option<User>
[src]
pub fn to_user(&self) -> Option<User>
Trait Implementations
impl Debug for Chat
[src]
[+]
impl Debug for Chat
impl PartialEq for Chat
[src]
[+]
impl PartialEq for Chat
impl Clone for Chat
[src]
[+]
impl Clone for Chat
impl Decodable for Chat
[src]
[+]
impl Decodable for Chat
impl Encodable for Chat
[src]
[+]
impl Encodable for Chat