pub struct RestrictChatMember { /* private fields */ }
Expand description
Use this method to kick a user from a group or a supergroup. In the case of supergroups, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the group for this to work.
Implementations§
Source§impl RestrictChatMember
impl RestrictChatMember
pub fn new<C, U>(chat: C, user: U) -> Self
pub fn until_date(self, value: i32) -> Self
pub fn can_send_messages(self, value: bool) -> Self
pub fn can_send_media_messages(self, value: bool) -> Self
pub fn can_send_other_messages(self, value: bool) -> Self
pub fn can_add_web_page_previews(self, value: bool) -> Self
Trait Implementations§
Source§impl Clone for RestrictChatMember
impl Clone for RestrictChatMember
Source§fn clone(&self) -> RestrictChatMember
fn clone(&self) -> RestrictChatMember
Returns a duplicate 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 RestrictChatMember
impl Debug for RestrictChatMember
Source§impl PartialEq for RestrictChatMember
impl PartialEq for RestrictChatMember
Source§impl PartialOrd for RestrictChatMember
impl PartialOrd for RestrictChatMember
Source§impl Request for RestrictChatMember
impl Request for RestrictChatMember
type Type = JsonRequestType<RestrictChatMember>
type Response = JsonTrueToUnitResponse
fn serialize(&self) -> Result<HttpRequest, Error>
fn detach(&self) -> DetachedRequest<Self::Response>
Source§impl Serialize for RestrictChatMember
impl Serialize for RestrictChatMember
impl StructuralPartialEq for RestrictChatMember
Auto Trait Implementations§
impl Freeze for RestrictChatMember
impl RefUnwindSafe for RestrictChatMember
impl Send for RestrictChatMember
impl Sync for RestrictChatMember
impl Unpin for RestrictChatMember
impl UnwindSafe for RestrictChatMember
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