[][src]Enum rtdlib::types::UserPrivacySettingRule

pub enum UserPrivacySettingRule {
    AllowAll(UserPrivacySettingRuleAllowAll),
    AllowChatMembers(UserPrivacySettingRuleAllowChatMembers),
    AllowContacts(UserPrivacySettingRuleAllowContacts),
    AllowUsers(UserPrivacySettingRuleAllowUsers),
    RestrictAll(UserPrivacySettingRuleRestrictAll),
    RestrictChatMembers(UserPrivacySettingRuleRestrictChatMembers),
    RestrictContacts(UserPrivacySettingRuleRestrictContacts),
    RestrictUsers(UserPrivacySettingRuleRestrictUsers),
    // some variants omitted
}

Represents a single rule for managing privacy settings

Variants

A rule to allow all users to do something

A rule to allow all members of certain specified basic groups and supergroups to doing something

A rule to allow all of a user's contacts to do something

A rule to allow certain specified users to do something

A rule to restrict all users from doing something

A rule to restrict all members of specified basic groups and supergroups from doing something

A rule to restrict all contacts of a user from doing something

A rule to restrict all specified users from doing something

Implementations

impl UserPrivacySettingRule[src]

pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>[src]

pub fn is_allow_all(&self) -> bool[src]

pub fn is_allow_chat_members(&self) -> bool[src]

pub fn is_allow_contacts(&self) -> bool[src]

pub fn is_allow_users(&self) -> bool[src]

pub fn is_restrict_all(&self) -> bool[src]

pub fn is_restrict_chat_members(&self) -> bool[src]

pub fn is_restrict_contacts(&self) -> bool[src]

pub fn is_restrict_users(&self) -> bool[src]

pub fn on_allow_all<F: FnOnce(&UserPrivacySettingRuleAllowAll)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_allow_chat_members<F: FnOnce(&UserPrivacySettingRuleAllowChatMembers)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_allow_contacts<F: FnOnce(&UserPrivacySettingRuleAllowContacts)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_allow_users<F: FnOnce(&UserPrivacySettingRuleAllowUsers)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_restrict_all<F: FnOnce(&UserPrivacySettingRuleRestrictAll)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_restrict_chat_members<F: FnOnce(&UserPrivacySettingRuleRestrictChatMembers)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_restrict_contacts<F: FnOnce(&UserPrivacySettingRuleRestrictContacts)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_restrict_users<F: FnOnce(&UserPrivacySettingRuleRestrictUsers)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn as_allow_all(&self) -> Option<&UserPrivacySettingRuleAllowAll>[src]

pub fn as_allow_chat_members(
    &self
) -> Option<&UserPrivacySettingRuleAllowChatMembers>
[src]

pub fn as_allow_contacts(&self) -> Option<&UserPrivacySettingRuleAllowContacts>[src]

pub fn as_allow_users(&self) -> Option<&UserPrivacySettingRuleAllowUsers>[src]

pub fn as_restrict_all(&self) -> Option<&UserPrivacySettingRuleRestrictAll>[src]

pub fn as_restrict_chat_members(
    &self
) -> Option<&UserPrivacySettingRuleRestrictChatMembers>
[src]

pub fn as_restrict_contacts(
    &self
) -> Option<&UserPrivacySettingRuleRestrictContacts>
[src]

pub fn as_restrict_users(&self) -> Option<&UserPrivacySettingRuleRestrictUsers>[src]

pub fn allow_all<T: AsRef<UserPrivacySettingRuleAllowAll>>(t: T) -> Self[src]

pub fn allow_chat_members<T: AsRef<UserPrivacySettingRuleAllowChatMembers>>(
    t: T
) -> Self
[src]

pub fn allow_contacts<T: AsRef<UserPrivacySettingRuleAllowContacts>>(
    t: T
) -> Self
[src]

pub fn allow_users<T: AsRef<UserPrivacySettingRuleAllowUsers>>(t: T) -> Self[src]

pub fn restrict_all<T: AsRef<UserPrivacySettingRuleRestrictAll>>(t: T) -> Self[src]

pub fn restrict_chat_members<T: AsRef<UserPrivacySettingRuleRestrictChatMembers>>(
    t: T
) -> Self
[src]

pub fn restrict_contacts<T: AsRef<UserPrivacySettingRuleRestrictContacts>>(
    t: T
) -> Self
[src]

pub fn restrict_users<T: AsRef<UserPrivacySettingRuleRestrictUsers>>(
    t: T
) -> Self
[src]

Trait Implementations

impl AsRef<UserPrivacySettingRule> for UserPrivacySettingRule[src]

impl Clone for UserPrivacySettingRule[src]

impl Debug for UserPrivacySettingRule[src]

impl Default for UserPrivacySettingRule[src]

impl<'de> Deserialize<'de> for UserPrivacySettingRule[src]

impl RObject for UserPrivacySettingRule[src]

impl Serialize for UserPrivacySettingRule[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.