pub struct NewChatPrivacySettings {
pub allow_new_chats_from_unknown_users: bool,
pub incoming_paid_message_star_count: i64,
}Expand description
Contains privacy settings for chats with non-contacts
Fields§
§allow_new_chats_from_unknown_users: boolTrue, if non-contacts users are able to write first to the current user. Telegram Premium subscribers are able to write first regardless of this setting
incoming_paid_message_star_count: i64Number of Telegram Stars that must be paid for every incoming private message by non-contacts; 0-getOption(“paid_message_star_count_max”). If positive, then allow_new_chats_from_unknown_users must be true. The current user will receive getOption(“paid_message_earnings_per_mille”) Telegram Stars for each 1000 Telegram Stars paid for message sending. Can be positive, only if getOption(“can_enable_paid_messages”) is true
Trait Implementations§
Source§impl Clone for NewChatPrivacySettings
impl Clone for NewChatPrivacySettings
Source§fn clone(&self) -> NewChatPrivacySettings
fn clone(&self) -> NewChatPrivacySettings
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NewChatPrivacySettings
impl Debug for NewChatPrivacySettings
Source§impl Default for NewChatPrivacySettings
impl Default for NewChatPrivacySettings
Source§fn default() -> NewChatPrivacySettings
fn default() -> NewChatPrivacySettings
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NewChatPrivacySettings
impl<'de> Deserialize<'de> for NewChatPrivacySettings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for NewChatPrivacySettings
impl PartialEq for NewChatPrivacySettings
Source§impl Serialize for NewChatPrivacySettings
impl Serialize for NewChatPrivacySettings
impl StructuralPartialEq for NewChatPrivacySettings
Auto Trait Implementations§
impl Freeze for NewChatPrivacySettings
impl RefUnwindSafe for NewChatPrivacySettings
impl Send for NewChatPrivacySettings
impl Sync for NewChatPrivacySettings
impl Unpin for NewChatPrivacySettings
impl UnsafeUnpin for NewChatPrivacySettings
impl UnwindSafe for NewChatPrivacySettings
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
Mutably borrows from an owned value. Read more