Struct botapi::gen_types::ChatMemberAdministrator
source · pub struct ChatMemberAdministrator { /* private fields */ }Expand description
Represents a chat member that has some additional privileges.
Implementations§
source§impl ChatMemberAdministrator
impl ChatMemberAdministrator
pub fn noskip(self) -> NoSkipChatMemberAdministrator
source§impl ChatMemberAdministrator
impl ChatMemberAdministrator
pub fn new( user: User, can_be_edited: bool, is_anonymous: bool, can_manage_chat: bool, can_delete_messages: bool, can_manage_video_chats: bool, can_restrict_members: bool, can_promote_members: bool, can_change_info: bool, can_invite_users: bool ) -> Self
sourcepub fn into_tuple(
self
) -> (User, bool, bool, bool, bool, bool, bool, bool, bool, bool, Option<bool>, Option<bool>, Option<bool>, Option<bool>, Option<bool>, Option<bool>, Option<bool>, Option<String>)
pub fn into_tuple( self ) -> (User, bool, bool, bool, bool, bool, bool, bool, bool, bool, Option<bool>, Option<bool>, Option<bool>, Option<bool>, Option<bool>, Option<bool>, Option<bool>, Option<String>)
Consumes and deconstructs this type into a tuple with one element per field. Tuple type returned is: (user, can_be_edited, is_anonymous, can_manage_chat, can_delete_messages, can_manage_video_chats, can_restrict_members, can_promote_members, can_change_info, can_invite_users, can_post_messages, can_edit_messages, can_pin_messages, can_post_stories, can_edit_stories, can_delete_stories, can_manage_topics, custom_title)
sourcepub fn get_user_ref<'a>(&'a self) -> &'a User
pub fn get_user_ref<'a>(&'a self) -> &'a User
Information about the user
sourcepub fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self
pub fn set_user<'a>(&'a mut self, user: User) -> &'a mut Self
Information about the user
sourcepub fn get_can_be_edited<'a>(&'a self) -> bool
pub fn get_can_be_edited<'a>(&'a self) -> bool
True, if the bot is allowed to edit administrator privileges of that user
sourcepub fn get_can_be_edited_ref<'a>(&'a self) -> bool
pub fn get_can_be_edited_ref<'a>(&'a self) -> bool
True, if the bot is allowed to edit administrator privileges of that user
sourcepub fn set_can_be_edited<'a>(&'a mut self, can_be_edited: bool) -> &'a mut Self
pub fn set_can_be_edited<'a>(&'a mut self, can_be_edited: bool) -> &'a mut Self
True, if the bot is allowed to edit administrator privileges of that user
sourcepub fn get_is_anonymous<'a>(&'a self) -> bool
pub fn get_is_anonymous<'a>(&'a self) -> bool
True, if the user’s presence in the chat is hidden
sourcepub fn get_is_anonymous_ref<'a>(&'a self) -> bool
pub fn get_is_anonymous_ref<'a>(&'a self) -> bool
True, if the user’s presence in the chat is hidden
sourcepub fn set_is_anonymous<'a>(&'a mut self, is_anonymous: bool) -> &'a mut Self
pub fn set_is_anonymous<'a>(&'a mut self, is_anonymous: bool) -> &'a mut Self
True, if the user’s presence in the chat is hidden
sourcepub fn get_can_manage_chat<'a>(&'a self) -> bool
pub fn get_can_manage_chat<'a>(&'a self) -> bool
True, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
sourcepub fn get_can_manage_chat_ref<'a>(&'a self) -> bool
pub fn get_can_manage_chat_ref<'a>(&'a self) -> bool
True, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
sourcepub fn set_can_manage_chat<'a>(
&'a mut self,
can_manage_chat: bool
) -> &'a mut Self
pub fn set_can_manage_chat<'a>( &'a mut self, can_manage_chat: bool ) -> &'a mut Self
True, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege
sourcepub fn get_can_delete_messages<'a>(&'a self) -> bool
pub fn get_can_delete_messages<'a>(&'a self) -> bool
True, if the administrator can delete messages of other users
sourcepub fn get_can_delete_messages_ref<'a>(&'a self) -> bool
pub fn get_can_delete_messages_ref<'a>(&'a self) -> bool
True, if the administrator can delete messages of other users
sourcepub fn set_can_delete_messages<'a>(
&'a mut self,
can_delete_messages: bool
) -> &'a mut Self
pub fn set_can_delete_messages<'a>( &'a mut self, can_delete_messages: bool ) -> &'a mut Self
True, if the administrator can delete messages of other users
sourcepub fn get_can_manage_video_chats<'a>(&'a self) -> bool
pub fn get_can_manage_video_chats<'a>(&'a self) -> bool
True, if the administrator can manage video chats
sourcepub fn get_can_manage_video_chats_ref<'a>(&'a self) -> bool
pub fn get_can_manage_video_chats_ref<'a>(&'a self) -> bool
True, if the administrator can manage video chats
sourcepub fn set_can_manage_video_chats<'a>(
&'a mut self,
can_manage_video_chats: bool
) -> &'a mut Self
pub fn set_can_manage_video_chats<'a>( &'a mut self, can_manage_video_chats: bool ) -> &'a mut Self
True, if the administrator can manage video chats
sourcepub fn get_can_restrict_members<'a>(&'a self) -> bool
pub fn get_can_restrict_members<'a>(&'a self) -> bool
True, if the administrator can restrict, ban or unban chat members
sourcepub fn get_can_restrict_members_ref<'a>(&'a self) -> bool
pub fn get_can_restrict_members_ref<'a>(&'a self) -> bool
True, if the administrator can restrict, ban or unban chat members
sourcepub fn set_can_restrict_members<'a>(
&'a mut self,
can_restrict_members: bool
) -> &'a mut Self
pub fn set_can_restrict_members<'a>( &'a mut self, can_restrict_members: bool ) -> &'a mut Self
True, if the administrator can restrict, ban or unban chat members
sourcepub fn get_can_promote_members<'a>(&'a self) -> bool
pub fn get_can_promote_members<'a>(&'a self) -> bool
True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)
sourcepub fn get_can_promote_members_ref<'a>(&'a self) -> bool
pub fn get_can_promote_members_ref<'a>(&'a self) -> bool
True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)
sourcepub fn set_can_promote_members<'a>(
&'a mut self,
can_promote_members: bool
) -> &'a mut Self
pub fn set_can_promote_members<'a>( &'a mut self, can_promote_members: bool ) -> &'a mut Self
True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)
sourcepub fn get_can_change_info<'a>(&'a self) -> bool
pub fn get_can_change_info<'a>(&'a self) -> bool
True, if the user is allowed to change the chat title, photo and other settings
sourcepub fn get_can_change_info_ref<'a>(&'a self) -> bool
pub fn get_can_change_info_ref<'a>(&'a self) -> bool
True, if the user is allowed to change the chat title, photo and other settings
sourcepub fn set_can_change_info<'a>(
&'a mut self,
can_change_info: bool
) -> &'a mut Self
pub fn set_can_change_info<'a>( &'a mut self, can_change_info: bool ) -> &'a mut Self
True, if the user is allowed to change the chat title, photo and other settings
sourcepub fn get_can_invite_users<'a>(&'a self) -> bool
pub fn get_can_invite_users<'a>(&'a self) -> bool
True, if the user is allowed to invite new users to the chat
sourcepub fn get_can_invite_users_ref<'a>(&'a self) -> bool
pub fn get_can_invite_users_ref<'a>(&'a self) -> bool
True, if the user is allowed to invite new users to the chat
sourcepub fn set_can_invite_users<'a>(
&'a mut self,
can_invite_users: bool
) -> &'a mut Self
pub fn set_can_invite_users<'a>( &'a mut self, can_invite_users: bool ) -> &'a mut Self
True, if the user is allowed to invite new users to the chat
sourcepub fn get_can_post_messages<'a>(&'a self) -> Option<bool>
pub fn get_can_post_messages<'a>(&'a self) -> Option<bool>
Optional. True, if the administrator can post messages in the channel; channels only
sourcepub fn get_can_post_messages_ref<'a>(&'a self) -> Option<bool>
pub fn get_can_post_messages_ref<'a>(&'a self) -> Option<bool>
Optional. True, if the administrator can post messages in the channel; channels only
sourcepub fn set_can_post_messages<'a>(
&'a mut self,
can_post_messages: Option<bool>
) -> &'a mut Self
pub fn set_can_post_messages<'a>( &'a mut self, can_post_messages: Option<bool> ) -> &'a mut Self
Optional. True, if the administrator can post messages in the channel; channels only
sourcepub fn get_can_edit_messages<'a>(&'a self) -> Option<bool>
pub fn get_can_edit_messages<'a>(&'a self) -> Option<bool>
Optional. True, if the administrator can edit messages of other users and can pin messages; channels only
sourcepub fn get_can_edit_messages_ref<'a>(&'a self) -> Option<bool>
pub fn get_can_edit_messages_ref<'a>(&'a self) -> Option<bool>
Optional. True, if the administrator can edit messages of other users and can pin messages; channels only
sourcepub fn set_can_edit_messages<'a>(
&'a mut self,
can_edit_messages: Option<bool>
) -> &'a mut Self
pub fn set_can_edit_messages<'a>( &'a mut self, can_edit_messages: Option<bool> ) -> &'a mut Self
Optional. True, if the administrator can edit messages of other users and can pin messages; channels only
sourcepub fn get_can_pin_messages<'a>(&'a self) -> Option<bool>
pub fn get_can_pin_messages<'a>(&'a self) -> Option<bool>
Optional. True, if the user is allowed to pin messages; groups and supergroups only
sourcepub fn get_can_pin_messages_ref<'a>(&'a self) -> Option<bool>
pub fn get_can_pin_messages_ref<'a>(&'a self) -> Option<bool>
Optional. True, if the user is allowed to pin messages; groups and supergroups only
sourcepub fn set_can_pin_messages<'a>(
&'a mut self,
can_pin_messages: Option<bool>
) -> &'a mut Self
pub fn set_can_pin_messages<'a>( &'a mut self, can_pin_messages: Option<bool> ) -> &'a mut Self
Optional. True, if the user is allowed to pin messages; groups and supergroups only
sourcepub fn get_can_post_stories<'a>(&'a self) -> Option<bool>
pub fn get_can_post_stories<'a>(&'a self) -> Option<bool>
Optional. True, if the administrator can post stories in the channel; channels only
sourcepub fn get_can_post_stories_ref<'a>(&'a self) -> Option<bool>
pub fn get_can_post_stories_ref<'a>(&'a self) -> Option<bool>
Optional. True, if the administrator can post stories in the channel; channels only
sourcepub fn set_can_post_stories<'a>(
&'a mut self,
can_post_stories: Option<bool>
) -> &'a mut Self
pub fn set_can_post_stories<'a>( &'a mut self, can_post_stories: Option<bool> ) -> &'a mut Self
Optional. True, if the administrator can post stories in the channel; channels only
sourcepub fn get_can_edit_stories<'a>(&'a self) -> Option<bool>
pub fn get_can_edit_stories<'a>(&'a self) -> Option<bool>
Optional. True, if the administrator can edit stories posted by other users; channels only
sourcepub fn get_can_edit_stories_ref<'a>(&'a self) -> Option<bool>
pub fn get_can_edit_stories_ref<'a>(&'a self) -> Option<bool>
Optional. True, if the administrator can edit stories posted by other users; channels only
sourcepub fn set_can_edit_stories<'a>(
&'a mut self,
can_edit_stories: Option<bool>
) -> &'a mut Self
pub fn set_can_edit_stories<'a>( &'a mut self, can_edit_stories: Option<bool> ) -> &'a mut Self
Optional. True, if the administrator can edit stories posted by other users; channels only
sourcepub fn get_can_delete_stories<'a>(&'a self) -> Option<bool>
pub fn get_can_delete_stories<'a>(&'a self) -> Option<bool>
Optional. True, if the administrator can delete stories posted by other users; channels only
sourcepub fn get_can_delete_stories_ref<'a>(&'a self) -> Option<bool>
pub fn get_can_delete_stories_ref<'a>(&'a self) -> Option<bool>
Optional. True, if the administrator can delete stories posted by other users; channels only
sourcepub fn set_can_delete_stories<'a>(
&'a mut self,
can_delete_stories: Option<bool>
) -> &'a mut Self
pub fn set_can_delete_stories<'a>( &'a mut self, can_delete_stories: Option<bool> ) -> &'a mut Self
Optional. True, if the administrator can delete stories posted by other users; channels only
sourcepub fn get_can_manage_topics<'a>(&'a self) -> Option<bool>
pub fn get_can_manage_topics<'a>(&'a self) -> Option<bool>
Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only
sourcepub fn get_can_manage_topics_ref<'a>(&'a self) -> Option<bool>
pub fn get_can_manage_topics_ref<'a>(&'a self) -> Option<bool>
Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only
sourcepub fn set_can_manage_topics<'a>(
&'a mut self,
can_manage_topics: Option<bool>
) -> &'a mut Self
pub fn set_can_manage_topics<'a>( &'a mut self, can_manage_topics: Option<bool> ) -> &'a mut Self
Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only
sourcepub fn get_custom_title<'a>(&'a self) -> Option<Cow<'a, str>>
pub fn get_custom_title<'a>(&'a self) -> Option<Cow<'a, str>>
Optional. Custom title for this user
sourcepub fn get_custom_title_ref<'a>(&'a self) -> Option<&'a str>
pub fn get_custom_title_ref<'a>(&'a self) -> Option<&'a str>
Optional. Custom title for this user
sourcepub fn set_custom_title<'a>(
&'a mut self,
custom_title: Option<String>
) -> &'a mut Self
pub fn set_custom_title<'a>( &'a mut self, custom_title: Option<String> ) -> &'a mut Self
Optional. Custom title for this user
Trait Implementations§
source§impl Clone for ChatMemberAdministrator
impl Clone for ChatMemberAdministrator
source§fn clone(&self) -> ChatMemberAdministrator
fn clone(&self) -> ChatMemberAdministrator
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more