pub struct NotificationSettings {
pub mode: Option<i32>,
pub silent: Option<bool>,
pub zen_mode_requires_mention: Option<bool>,
pub zen_mode_uses_default_rules: Option<bool>,
pub zen_mode_custom_rules: Option<String>,
pub disable_dm_notifications: Option<bool>,
}Fields§
§mode: Option<i32>§silent: Option<bool>If true, no sound will be played for notifications
zen_mode_requires_mention: Option<bool>If true, the notification requires mentioning the user
zen_mode_uses_default_rules: Option<bool>If true, the default rules will be used
zen_mode_custom_rules: Option<String>Custom rules for notifications
disable_dm_notifications: Option<bool>If true, direct message notifications are disabled
Implementations§
Source§impl NotificationSettings
impl NotificationSettings
Sourcepub fn mode(&self) -> Mode
pub fn mode(&self) -> Mode
Returns the enum value of mode, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn silent(&self) -> bool
pub fn silent(&self) -> bool
Returns the value of silent, or the default value if silent is unset.
Sourcepub fn zen_mode_requires_mention(&self) -> bool
pub fn zen_mode_requires_mention(&self) -> bool
Returns the value of zen_mode_requires_mention, or the default value if zen_mode_requires_mention is unset.
Sourcepub fn zen_mode_uses_default_rules(&self) -> bool
pub fn zen_mode_uses_default_rules(&self) -> bool
Returns the value of zen_mode_uses_default_rules, or the default value if zen_mode_uses_default_rules is unset.
Sourcepub fn zen_mode_custom_rules(&self) -> &str
pub fn zen_mode_custom_rules(&self) -> &str
Returns the value of zen_mode_custom_rules, or the default value if zen_mode_custom_rules is unset.
Sourcepub fn disable_dm_notifications(&self) -> bool
pub fn disable_dm_notifications(&self) -> bool
Returns the value of disable_dm_notifications, or the default value if disable_dm_notifications is unset.
Trait Implementations§
Source§impl Clone for NotificationSettings
impl Clone for NotificationSettings
Source§fn clone(&self) -> NotificationSettings
fn clone(&self) -> NotificationSettings
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NotificationSettings
impl Debug for NotificationSettings
Source§impl Default for NotificationSettings
impl Default for NotificationSettings
Source§fn default() -> NotificationSettings
fn default() -> NotificationSettings
Source§impl<'de> Deserialize<'de> for NotificationSettings
impl<'de> Deserialize<'de> for NotificationSettings
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NotificationSettings, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NotificationSettings, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Message for NotificationSettings
impl Message for NotificationSettings
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.Source§impl PartialEq for NotificationSettings
impl PartialEq for NotificationSettings
Source§fn eq(&self, other: &NotificationSettings) -> bool
fn eq(&self, other: &NotificationSettings) -> bool
self and other values to be equal, and is used by ==.