#[non_exhaustive]
pub enum Status {
Creator {
custom_title: Option<String>,
is_anonymous: bool,
},
Administrator {Show 13 fields
custom_title: Option<String>,
can_manage_chat: bool,
can_be_edited: bool,
can_change_info: bool,
can_post_messages: Option<bool>,
can_edit_messages: Option<bool>,
can_delete_messages: bool,
can_invite_users: bool,
can_restrict_members: bool,
can_pin_messages: Option<bool>,
can_promote_members: bool,
can_manage_voice_chats: bool,
is_anonymous: bool,
},
Member,
Restricted {
until_date: Option<i64>,
is_member: bool,
can_send_mesages: bool,
can_send_media_messages: bool,
can_send_other_messages: bool,
can_add_web_page_previews: bool,
can_send_polls: bool,
can_change_info: bool,
can_invite_users: bool,
can_pin_messages: bool,
},
Left,
Kicked {
until_date: Option<i64>,
},
}
Expand description
Represents the status of a member.
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.
Creator
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 user is the creator of the chat.
Administrator
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 user is an administrator of the chat.
Member
The user is a member of the chat.
Restricted
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 user is restricted in the chat.
Left
The user left the chat.
Kicked
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 user was kicked out of the chat.
Implementations§
source§impl Status
impl Status
sourcepub fn is_creator(&self) -> bool
pub fn is_creator(&self) -> bool
Returns true
if self
is of variant Creator
.
sourcepub fn is_administrator(&self) -> bool
pub fn is_administrator(&self) -> bool
Returns true
if self
is of variant Administrator
.
sourcepub fn is_restricted(&self) -> bool
pub fn is_restricted(&self) -> bool
Returns true
if self
is of variant Restricted
.