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: RecipientUnique identifier for the target chat or username of the target channel (in the format @channelusername)
permissions: ChatPermissionsNew default chat permissions
Implementations
sourceimpl SetChatPermissions
impl SetChatPermissions
pub fn new(chat_id: impl Into<Recipient>, permissions: ChatPermissions) -> Self
Trait Implementations
sourceimpl Clone for SetChatPermissions
impl Clone for SetChatPermissions
sourcefn clone(&self) -> SetChatPermissionsⓘNotable traits for SetChatPermissionsimpl Payload for SetChatPermissions type Output = True;
fn clone(&self) -> SetChatPermissionsⓘNotable traits for SetChatPermissionsimpl Payload for SetChatPermissions type Output = True;
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for SetChatPermissions
impl Debug for SetChatPermissions
sourceimpl Hash for SetChatPermissions
impl Hash for SetChatPermissions
sourceimpl PartialEq<SetChatPermissions> for SetChatPermissions
impl PartialEq<SetChatPermissions> for SetChatPermissions
sourcefn eq(&self, other: &SetChatPermissions) -> bool
fn eq(&self, other: &SetChatPermissions) -> bool
sourceimpl Payload for SetChatPermissions
impl Payload for SetChatPermissions
sourcefn 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. Read moresourceimpl 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<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,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.