Enum tbot::types::chat::member::Status

source ·
#[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.
§custom_title: Option<String>

Custom title of the creator.

§is_anonymous: bool

true if the creator is anonymous.

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.
§custom_title: Option<String>

Custom title of the admin.

§can_manage_chat: bool

true if the admin can perform any administrative actions.

§can_be_edited: bool

true if the bot can edit this admin’s rights.

§can_change_info: bool

true if the admin can change the group’s info.

§can_post_messages: Option<bool>

true if the admin can post messages (channels only).

§can_edit_messages: Option<bool>

true if the admin can edit messages (channels only).

§can_delete_messages: bool

true if the admin can delete messages.

§can_invite_users: bool

true if the admin can invite users.

§can_restrict_members: bool

true if the admin can restruct users.

§can_pin_messages: Option<bool>

true if the admin can pin messages.

§can_promote_members: bool

true if the admin can promote members.

§can_manage_voice_chats: bool

true if the admin can manage voice chats.

§is_anonymous: bool

true if the admin is anonymous.

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.
§until_date: Option<i64>

Time when the restriction will be lifted.

§is_member: bool

true if the user is a member of the chat.

§can_send_mesages: bool

true if the user can send messages.

§can_send_media_messages: bool

true if the user can send media messages.

§can_send_other_messages: bool

true if the user can send other messages, such as games.

§can_add_web_page_previews: bool

true if the user can send messages with link previews.

§can_send_polls: bool

true if the user can send polls.

§can_change_info: bool

true if the user can change the group’s info.

§can_invite_users: bool

true if the user can invite users.

§can_pin_messages: bool

true if the user can pin messages.

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.
§until_date: Option<i64>

Time when the restriction will be lifted.

The user was kicked out of the chat.

Implementations§

Returns true if self is of variant Creator.

Returns true if self is of variant Administrator.

Returns true if self is of variant Member.

Returns true if self is of variant Restricted.

Returns true if self is of variant Left.

Returns true if self is of variant Kicked.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more