pub enum UserPrivacySettingRule {
AllowAll(UserPrivacySettingRuleAllowAll),
AllowChatMembers(UserPrivacySettingRuleAllowChatMembers),
AllowContacts(UserPrivacySettingRuleAllowContacts),
AllowUsers(UserPrivacySettingRuleAllowUsers),
RestrictAll(UserPrivacySettingRuleRestrictAll),
RestrictChatMembers(UserPrivacySettingRuleRestrictChatMembers),
RestrictContacts(UserPrivacySettingRuleRestrictContacts),
RestrictUsers(UserPrivacySettingRuleRestrictUsers),
// some variants omitted
}
Expand description
Represents a single rule for managing privacy settings
Variants
AllowAll(UserPrivacySettingRuleAllowAll)
Tuple Fields
A rule to allow all users to do something
AllowChatMembers(UserPrivacySettingRuleAllowChatMembers)
Tuple Fields
A rule to allow all members of certain specified basic groups and supergroups to doing something
AllowContacts(UserPrivacySettingRuleAllowContacts)
Tuple Fields
A rule to allow all of a user’s contacts to do something
AllowUsers(UserPrivacySettingRuleAllowUsers)
Tuple Fields
A rule to allow certain specified users to do something
RestrictAll(UserPrivacySettingRuleRestrictAll)
Tuple Fields
A rule to restrict all users from doing something
RestrictChatMembers(UserPrivacySettingRuleRestrictChatMembers)
Tuple Fields
A rule to restrict all members of specified basic groups and supergroups from doing something
RestrictContacts(UserPrivacySettingRuleRestrictContacts)
Tuple Fields
A rule to restrict all contacts of a user from doing something
RestrictUsers(UserPrivacySettingRuleRestrictUsers)
Tuple Fields
A rule to restrict all specified users from doing something
Implementations
pub fn on_allow_chat_members<F: FnOnce(&UserPrivacySettingRuleAllowChatMembers)>(
&self,
fnc: F
) -> &Self
pub fn on_allow_contacts<F: FnOnce(&UserPrivacySettingRuleAllowContacts)>(
&self,
fnc: F
) -> &Self
pub fn on_restrict_all<F: FnOnce(&UserPrivacySettingRuleRestrictAll)>(
&self,
fnc: F
) -> &Self
pub fn on_restrict_chat_members<F: FnOnce(&UserPrivacySettingRuleRestrictChatMembers)>(
&self,
fnc: F
) -> &Self
pub fn on_restrict_contacts<F: FnOnce(&UserPrivacySettingRuleRestrictContacts)>(
&self,
fnc: F
) -> &Self
pub fn on_restrict_users<F: FnOnce(&UserPrivacySettingRuleRestrictUsers)>(
&self,
fnc: F
) -> &Self
pub fn restrict_chat_members<T: AsRef<UserPrivacySettingRuleRestrictChatMembers>>(
t: T
) -> Self
Trait Implementations
Performs the conversion.
fn deserialize<D>(deserializer: D) -> Result<UserPrivacySettingRule, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<UserPrivacySettingRule, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for UserPrivacySettingRule
impl Send for UserPrivacySettingRule
impl Sync for UserPrivacySettingRule
impl Unpin for UserPrivacySettingRule
impl UnwindSafe for UserPrivacySettingRule
Blanket Implementations
Mutably borrows from an owned value. Read more