Struct teloxide_core::payloads::RestrictChatMember
source · [−]pub struct RestrictChatMember {
pub chat_id: Recipient,
pub user_id: UserId,
pub permissions: ChatPermissions,
pub until_date: Option<DateTime<Utc>>,
}Expand description
Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.
Fields
chat_id: RecipientUnique identifier for the target chat or username of the target channel (in the format @channelusername)
user_id: UserIdUnique identifier of the target user
permissions: ChatPermissionsA JSON-serialized object for new user permissions
until_date: Option<DateTime<Utc>>Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever
Implementations
Trait Implementations
sourceimpl Clone for RestrictChatMember
impl Clone for RestrictChatMember
sourcefn clone(&self) -> RestrictChatMemberⓘNotable traits for RestrictChatMemberimpl Payload for RestrictChatMember type Output = True;
fn clone(&self) -> RestrictChatMemberⓘNotable traits for RestrictChatMemberimpl Payload for RestrictChatMember 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 RestrictChatMember
impl Debug for RestrictChatMember
sourceimpl Hash for RestrictChatMember
impl Hash for RestrictChatMember
sourceimpl PartialEq<RestrictChatMember> for RestrictChatMember
impl PartialEq<RestrictChatMember> for RestrictChatMember
sourcefn eq(&self, other: &RestrictChatMember) -> bool
fn eq(&self, other: &RestrictChatMember) -> bool
sourceimpl Payload for RestrictChatMember
impl Payload for RestrictChatMember
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 RestrictChatMember
impl Serialize for RestrictChatMember
impl Eq for RestrictChatMember
impl StructuralEq for RestrictChatMember
impl StructuralPartialEq for RestrictChatMember
Auto Trait Implementations
impl RefUnwindSafe for RestrictChatMember
impl Send for RestrictChatMember
impl Sync for RestrictChatMember
impl Unpin for RestrictChatMember
impl UnwindSafe for RestrictChatMember
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.