Struct telexide::api::types::PromoteChatMember[][src]

pub struct PromoteChatMember {
Show fields pub chat_id: i64, pub user_id: i64, pub is_anonymous: Option<bool>, pub can_post_messages: Option<bool>, pub can_edit_messages: Option<bool>, pub can_delete_messages: Option<bool>, pub can_restrict_members: Option<bool>, pub can_promote_members: Option<bool>, pub can_change_info: Option<bool>, pub can_invite_users: Option<bool>, pub can_pin_messages: Option<bool>, pub can_manage_voice_chats: Option<bool>, pub can_manage_chat: Option<bool>,
}

struct for holding data needed to call promote_chat_member

Fields

chat_id: i64

Unique identifier for the target chat

user_id: i64

Unique identifier of the target user

is_anonymous: Option<bool>

If the administrator’s presence in the chat is hidden

can_post_messages: Option<bool>

If the administrator can create channel posts, channels only

can_edit_messages: Option<bool>

If the administrator can edit messages of other users and can pin messages, channels only

can_delete_messages: Option<bool>

If the administrator can delete messages of other users

can_restrict_members: Option<bool>

If the administrator can restrict, ban or unban chat members

can_promote_members: Option<bool>

If the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)

can_change_info: Option<bool>

If the administrator can change chat title, photo and other settings

can_invite_users: Option<bool>

If the administrator can invite new users to the chat

can_pin_messages: Option<bool>

If the administrator can pin messages, supergroups only

can_manage_voice_chats: Option<bool>

If the administrator can manage voice chats, supergroups only

can_manage_chat: Option<bool>

If the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege.

Implementations

impl PromoteChatMember[src]

pub fn new(chat_id: i64, user_id: i64) -> Self[src]

function to create a new PromoteChatMember object, setting all optional fields to None

Trait Implementations

impl Clone for PromoteChatMember[src]

impl Debug for PromoteChatMember[src]

impl<'de> Deserialize<'de> for PromoteChatMember[src]

impl PartialEq<PromoteChatMember> for PromoteChatMember[src]

impl Serialize for PromoteChatMember[src]

impl StructuralPartialEq for PromoteChatMember[src]

Auto Trait Implementations

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> CloneAny for T where
    T: Any + Clone
[src]

impl<T> DebugAny for T where
    T: Any + Debug
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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> 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.

impl<T> UnsafeAny for T where
    T: Any