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
sourceimpl RestrictChatMember
impl RestrictChatMember
pub fn new<C, U>(chat: C, user: U) -> Selfwhere
C: ToChatRef,
U: ToUserId,
pub fn until_date(&mut self, value: i32) -> &mut Self
pub fn can_send_messages(&mut self, value: bool) -> &mut Self
pub fn can_send_media_messages(&mut self, value: bool) -> &mut Self
pub fn can_send_other_messages(&mut self, value: bool) -> &mut Self
pub fn can_add_web_page_previews(&mut self, value: bool) -> &mut Self
Trait Implementations
sourceimpl Clone for RestrictChatMember
impl Clone for RestrictChatMember
sourcefn clone(&self) -> RestrictChatMember
fn clone(&self) -> RestrictChatMember
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 PartialEq<RestrictChatMember> for RestrictChatMember
impl PartialEq<RestrictChatMember> for RestrictChatMember
sourcefn eq(&self, other: &RestrictChatMember) -> bool
fn eq(&self, other: &RestrictChatMember) -> bool
sourceimpl PartialOrd<RestrictChatMember> for RestrictChatMember
impl PartialOrd<RestrictChatMember> for RestrictChatMember
sourcefn partial_cmp(&self, other: &RestrictChatMember) -> Option<Ordering>
fn partial_cmp(&self, other: &RestrictChatMember) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl 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>
sourceimpl Serialize for RestrictChatMember
impl Serialize 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