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

#[non_exhaustive]
pub enum Status {
    Creator,
    Administator {
        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: bool,
        can_promote_members: 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.

Administator

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.

Fields of Administator

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: bool

true if the admin can pin messages.

can_promote_members: bool

true if the admin can promote members.

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.

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.

Fields of Kicked

until_date: Option<i64>

Time when the restriction will be lifted.

Methods

impl Status[src]

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

Checks if self is Creator.

#[must_use] pub fn is_administator(&self) -> bool[src]

Checks if self is Administrator.

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

Checks if self is Member.

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

Checks if self is Restricted.

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

Checks if self is Left.

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

Checks if self is Kicked.

Trait Implementations

impl Clone for Status[src]

impl Copy for Status[src]

impl Debug for Status[src]

impl Eq for Status[src]

impl Hash for Status[src]

impl PartialEq<Status> 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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

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.