Struct teloxide_core::payloads::SetChatPermissions
source · pub struct SetChatPermissions {
pub chat_id: Recipient,
pub permissions: ChatPermissions,
}
Expand description
Use this method to set 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. Returns True on success.
Fields§
§chat_id: Recipient
Unique identifier for the target chat or username of the target channel (in the format @channelusername
)
permissions: ChatPermissions
New default chat permissions
Implementations§
source§impl SetChatPermissions
impl SetChatPermissions
pub fn new(chat_id: impl Into<Recipient>, permissions: ChatPermissions) -> Self
Trait Implementations§
source§impl Clone for SetChatPermissions
impl Clone for SetChatPermissions
source§impl Debug for SetChatPermissions
impl Debug for SetChatPermissions
source§impl Hash for SetChatPermissions
impl Hash for SetChatPermissions
source§impl PartialEq<SetChatPermissions> for SetChatPermissions
impl PartialEq<SetChatPermissions> for SetChatPermissions
source§fn eq(&self, other: &SetChatPermissions) -> bool
fn eq(&self, other: &SetChatPermissions) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Payload for SetChatPermissions
impl Payload for SetChatPermissions
source§fn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
If this payload may take long time to execute (e.g.
GetUpdates
with
big timeout
), the minimum timeout that should be used.source§impl Serialize for SetChatPermissions
impl Serialize for SetChatPermissions
impl Eq for SetChatPermissions
impl StructuralEq for SetChatPermissions
impl StructuralPartialEq for SetChatPermissions
Auto Trait Implementations§
impl RefUnwindSafe for SetChatPermissions
impl Send for SetChatPermissions
impl Sync for SetChatPermissions
impl Unpin for SetChatPermissions
impl UnwindSafe for SetChatPermissions
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.