[][src]Enum rtdlib::types::UserPrivacySetting

pub enum UserPrivacySetting {
    AllowCalls(UserPrivacySettingAllowCalls),
    AllowChatInvites(UserPrivacySettingAllowChatInvites),
    AllowFindingByPhoneNumber(UserPrivacySettingAllowFindingByPhoneNumber),
    AllowPeerToPeerCalls(UserPrivacySettingAllowPeerToPeerCalls),
    ShowLinkInForwardedMessages(UserPrivacySettingShowLinkInForwardedMessages),
    ShowPhoneNumber(UserPrivacySettingShowPhoneNumber),
    ShowProfilePhoto(UserPrivacySettingShowProfilePhoto),
    ShowStatus(UserPrivacySettingShowStatus),
    // some variants omitted
}

Describes available user privacy settings

Variants

A privacy setting for managing whether the user can be called

A privacy setting for managing whether the user can be invited to chats

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"

A privacy setting for managing whether peer-to-peer connections can be used for calls

A privacy setting for managing whether a link to the user's account is included in forwarded messages

A privacy setting for managing whether the user's phone number is visible

A privacy setting for managing whether the user's profile photo is visible

A privacy setting for managing whether the user's online status is visible

Implementations

impl UserPrivacySetting[src]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pub fn as_allow_calls(&self) -> Option<&UserPrivacySettingAllowCalls>[src]

pub fn as_allow_chat_invites(
    &self
) -> Option<&UserPrivacySettingAllowChatInvites>
[src]

pub fn as_allow_finding_by_phone_number(
    &self
) -> Option<&UserPrivacySettingAllowFindingByPhoneNumber>
[src]

pub fn as_allow_peer_to_peer_calls(
    &self
) -> Option<&UserPrivacySettingAllowPeerToPeerCalls>
[src]

pub fn as_show_phone_number(&self) -> Option<&UserPrivacySettingShowPhoneNumber>[src]

pub fn as_show_profile_photo(
    &self
) -> Option<&UserPrivacySettingShowProfilePhoto>
[src]

pub fn as_show_status(&self) -> Option<&UserPrivacySettingShowStatus>[src]

pub fn allow_calls<T: AsRef<UserPrivacySettingAllowCalls>>(t: T) -> Self[src]

pub fn allow_chat_invites<T: AsRef<UserPrivacySettingAllowChatInvites>>(
    t: T
) -> Self
[src]

pub fn allow_finding_by_phone_number<T: AsRef<UserPrivacySettingAllowFindingByPhoneNumber>>(
    t: T
) -> Self
[src]

pub fn allow_peer_to_peer_calls<T: AsRef<UserPrivacySettingAllowPeerToPeerCalls>>(
    t: T
) -> Self
[src]

pub fn show_phone_number<T: AsRef<UserPrivacySettingShowPhoneNumber>>(
    t: T
) -> Self
[src]

pub fn show_profile_photo<T: AsRef<UserPrivacySettingShowProfilePhoto>>(
    t: T
) -> Self
[src]

pub fn show_status<T: AsRef<UserPrivacySettingShowStatus>>(t: T) -> Self[src]

Trait Implementations

impl AsRef<UserPrivacySetting> for UserPrivacySetting[src]

impl Clone for UserPrivacySetting[src]

impl Debug for UserPrivacySetting[src]

impl Default for UserPrivacySetting[src]

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

impl RObject for UserPrivacySetting[src]

impl Serialize for UserPrivacySetting[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.