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

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,
    },
    Left,
    Kicked {
        until_date: Option<i64>,
    },
}

Represents the status of a member.

Variants

Creator

The user is the creator of the chat.

Administator

The user is an administrator of the chat.

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.

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 semd messages with link previews.

Left

The user left the chat.

Kicked

The user was kicked out of the chat.

Fields of Kicked

until_date: Option<i64>

Time when the restriction will be lifted.

Methods

impl Status[src]

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

Checks if self is Creator.

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

Checks if self is Administrator.

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

Checks if self is Member.

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

Checks if self is Restricted.

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

Checks if self is Left.

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

Checks if self is Kicked.

Trait Implementations

impl PartialEq<Status> for Status[src]

impl Clone for Status[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Eq for Status[src]

impl Copy for Status[src]

impl Debug for Status[src]

impl Hash for Status[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Unpin for Status

impl Sync for Status

impl Send for Status

impl RefUnwindSafe for Status

impl UnwindSafe for Status

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

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

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.

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

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

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

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T