pub enum ChatMemberStatus {
Owner,
Administrator,
Member,
Restricted,
Left,
Banned,
}Variants§
Implementations§
Source§impl ChatMemberStatus
Simple methods for checking a user status.
impl ChatMemberStatus
Simple methods for checking a user status.
Sourcepub fn is_administrator(&self) -> bool
pub fn is_administrator(&self) -> bool
Returns true if the user is an administrator of the given chat.
Note: this function doesn’t return true if the user is the
owner of the given chat. See also: is_privileged.
Sourcepub fn is_member(&self) -> bool
pub fn is_member(&self) -> bool
Returns true if the user is a common member of the given chat.
⚠️ Don’t confuse this with is_present. This method merely checks
for ChatMemberStatus::Member variant which is not enough to
determine if the user is joinned to the chat. Use is_present for
that instead.
Sourcepub fn is_restricted(&self) -> bool
pub fn is_restricted(&self) -> bool
Returns true if the user is restricted in the given chat.
Sourcepub fn is_left(&self) -> bool
pub fn is_left(&self) -> bool
Returns true if the user left the given chat.
⚠️ Don’t confuse this with is_present. This method merely checks
for ChatMemberStatus::Left variant which is not enough to determine
if the user is joinned to the chat. Use is_present for that instead.
Source§impl ChatMemberStatus
Compound methods for checking a user status.
impl ChatMemberStatus
Compound methods for checking a user status.
Sourcepub fn is_privileged(&self) -> bool
pub fn is_privileged(&self) -> bool
Returns true if the user is privileged in the given chat. i.e. if the
user is either the owner or an administrator in the given chat.
Trait Implementations§
Source§impl Clone for ChatMemberStatus
impl Clone for ChatMemberStatus
Source§fn clone(&self) -> ChatMemberStatus
fn clone(&self) -> ChatMemberStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ChatMemberStatus
Source§impl Debug for ChatMemberStatus
impl Debug for ChatMemberStatus
Source§impl<'de> Deserialize<'de> for ChatMemberStatus
impl<'de> Deserialize<'de> for ChatMemberStatus
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChatMemberStatus, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChatMemberStatus, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ChatMemberStatus
Source§impl Hash for ChatMemberStatus
impl Hash for ChatMemberStatus
Source§impl PartialEq for ChatMemberStatus
impl PartialEq for ChatMemberStatus
Source§impl Serialize for ChatMemberStatus
impl Serialize for ChatMemberStatus
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ChatMemberStatus
Auto Trait Implementations§
impl Forget for ChatMemberStatus
impl Freeze for ChatMemberStatus
impl Move for ChatMemberStatus
impl RefUnwindSafe for ChatMemberStatus
impl Send for ChatMemberStatus
impl Sync for ChatMemberStatus
impl Unpin for ChatMemberStatus
impl UnsafeUnpin for ChatMemberStatus
impl UnwindSafe for ChatMemberStatus
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Erasable for T
impl<T> Erasable for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more