Enum tbot::types::chat::member::Status[][src]

#[non_exhaustive]
pub enum Status {
    Creator {
        custom_title: Option<String>,
        is_anonymous: bool,
    },
    Administrator {
Show 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>, }, }

Represents the status of a member.

Variants (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

The user is the creator of the chat.

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.
Show fields

Fields of Creator

custom_title: Option<String>

Custom title of the creator.

is_anonymous: bool

true if the creator is anonymous.

Administrator

The user is an administrator of the chat.

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.
Show fields

Fields of Administrator

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.

Member

The user is a member of the chat.

Restricted

The user is restricted in the chat.

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.
Show fields

Fields of Restricted

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.

Left

The user left the chat.

Kicked

The user was kicked out of the chat.

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.
Show fields

Fields of Kicked

until_date: Option<i64>

Time when the restriction will be lifted.

Implementations

impl Status[src]

pub fn is_creator(&self) -> bool[src]

Returns true if self is of variant Creator.

pub fn is_administrator(&self) -> bool[src]

Returns true if self is of variant Administrator.

pub fn is_member(&self) -> bool[src]

Returns true if self is of variant Member.

pub fn is_restricted(&self) -> bool[src]

Returns true if self is of variant Restricted.

pub fn is_left(&self) -> bool[src]

Returns true if self is of variant Left.

pub fn is_kicked(&self) -> bool[src]

Returns true if self is of variant Kicked.

Trait Implementations

impl Clone for Status[src]

impl Debug for Status[src]

impl Hash for Status[src]

impl PartialEq<Status> for Status[src]

impl Eq for Status[src]

impl StructuralEq for Status[src]

impl StructuralPartialEq for Status[src]

Auto Trait Implementations

impl RefUnwindSafe for Status

impl Send for Status

impl Sync for Status

impl Unpin for Status

impl UnwindSafe for Status

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.