Enum rtdlib::types::UserPrivacySetting [−][src]
pub enum UserPrivacySetting {
AllowCalls(UserPrivacySettingAllowCalls),
AllowChatInvites(UserPrivacySettingAllowChatInvites),
AllowFindingByPhoneNumber(UserPrivacySettingAllowFindingByPhoneNumber),
AllowPeerToPeerCalls(UserPrivacySettingAllowPeerToPeerCalls),
ShowLinkInForwardedMessages(UserPrivacySettingShowLinkInForwardedMessages),
ShowPhoneNumber(UserPrivacySettingShowPhoneNumber),
ShowProfilePhoto(UserPrivacySettingShowProfilePhoto),
ShowStatus(UserPrivacySettingShowStatus),
// some variants omitted
}
Expand description
Describes available user privacy settings
Variants
A privacy setting for managing whether the user can be called
Tuple Fields of AllowCalls
A privacy setting for managing whether the user can be invited to chats
Tuple Fields of AllowChatInvites
A privacy setting for managing whether the user can be found by their phone number. Checked only if the phone number is not known to the other user. Can be set only to “Allow contacts” or “Allow all”
Tuple Fields of AllowFindingByPhoneNumber
A privacy setting for managing whether peer-to-peer connections can be used for calls
Tuple Fields of AllowPeerToPeerCalls
A privacy setting for managing whether a link to the user’s account is included in forwarded messages
Tuple Fields of ShowLinkInForwardedMessages
A privacy setting for managing whether the user’s phone number is visible
Tuple Fields of ShowPhoneNumber
A privacy setting for managing whether the user’s profile photo is visible
Tuple Fields of ShowProfilePhoto
A privacy setting for managing whether the user’s online status is visible
Tuple Fields of ShowStatus
Implementations
pub fn on_allow_chat_invites<F: FnOnce(&UserPrivacySettingAllowChatInvites)>(
&self,
fnc: F
) -> &Self
pub fn on_allow_finding_by_phone_number<F: FnOnce(&UserPrivacySettingAllowFindingByPhoneNumber)>(
&self,
fnc: F
) -> &Self
pub fn on_allow_peer_to_peer_calls<F: FnOnce(&UserPrivacySettingAllowPeerToPeerCalls)>(
&self,
fnc: F
) -> &Self
pub fn on_show_link_in_forwarded_messages<F: FnOnce(&UserPrivacySettingShowLinkInForwardedMessages)>(
&self,
fnc: F
) -> &Self
pub fn on_show_phone_number<F: FnOnce(&UserPrivacySettingShowPhoneNumber)>(
&self,
fnc: F
) -> &Self
pub fn on_show_profile_photo<F: FnOnce(&UserPrivacySettingShowProfilePhoto)>(
&self,
fnc: F
) -> &Self
pub fn as_allow_finding_by_phone_number(
&self
) -> Option<&UserPrivacySettingAllowFindingByPhoneNumber>
pub fn as_show_link_in_forwarded_messages(
&self
) -> Option<&UserPrivacySettingShowLinkInForwardedMessages>
pub fn allow_finding_by_phone_number<T: AsRef<UserPrivacySettingAllowFindingByPhoneNumber>>(
t: T
) -> Self
pub fn allow_peer_to_peer_calls<T: AsRef<UserPrivacySettingAllowPeerToPeerCalls>>(
t: T
) -> Self
pub fn show_link_in_forwarded_messages<T: AsRef<UserPrivacySettingShowLinkInForwardedMessages>>(
t: T
) -> Self
Trait Implementations
Performs the conversion.
fn deserialize<D>(deserializer: D) -> Result<UserPrivacySetting, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<UserPrivacySetting, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for UserPrivacySetting
impl Send for UserPrivacySetting
impl Sync for UserPrivacySetting
impl Unpin for UserPrivacySetting
impl UnwindSafe for UserPrivacySetting
Blanket Implementations
Mutably borrows from an owned value. Read more