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

pub struct PromoteChatMember {
    pub chat_id: i64,
    pub user_id: i64,
    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>,
}

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

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

Methods

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: Clone + Any
[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, 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