Struct tgbot::types::SetChatPermissions
source · pub struct SetChatPermissions { /* private fields */ }
Expand description
Sets default chat permissions for all members.
The bot must be an administrator in the group or a supergroup
for this to work and must have the can_restrict_members
admin rights.
Implementations§
source§impl SetChatPermissions
impl SetChatPermissions
sourcepub fn new<T>(chat_id: T, permissions: ChatPermissions) -> Self
pub fn new<T>(chat_id: T, permissions: ChatPermissions) -> Self
Creates a new SetChatPermissions
§Arguments
chat_id
- Unique identifier of the target chat.permissions
- New permissions.
sourcepub fn with_use_independent_chat_permissions(self, value: bool) -> Self
pub fn with_use_independent_chat_permissions(self, value: bool) -> Self
Sets a new value for a use_independent_chat_permissions
flag.
§Arguments
value
- Indicates whether the chat permissions are set independently.
If false
, the can_send_other_messages
and can_add_web_page_previews
permissions
will imply the can_send_messages
, can_send_audios
, can_send_documents
, can_send_photos
,
can_send_videos
, can_send_video_notes
, and can_send_voice_notes
permissions;
the can_send_polls
permission will imply the can_send_messages
permission.
Trait Implementations§
source§impl Clone for SetChatPermissions
impl Clone for SetChatPermissions
source§fn clone(&self) -> SetChatPermissions
fn clone(&self) -> SetChatPermissions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SetChatPermissions
impl Debug for SetChatPermissions
source§impl Method for SetChatPermissions
impl Method for SetChatPermissions
Auto Trait Implementations§
impl Freeze for SetChatPermissions
impl RefUnwindSafe for SetChatPermissions
impl Send for SetChatPermissions
impl Sync for SetChatPermissions
impl Unpin for SetChatPermissions
impl UnwindSafe for SetChatPermissions
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more