pub struct DmConfig {
pub enabled: bool,
pub policy: Option<String>,
pub allow_from: Vec<String>,
}Expand description
DM (Direct Message) configuration for messengers.
Fields§
§enabled: boolWhether DMs are enabled.
policy: Option<String>DM policy: “allowlist” (only allow_from users), “open” (anyone), “pairing” (require code).
allow_from: Vec<String>List of user IDs allowed to send DMs (for “allowlist” policy).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DmConfig
impl<'de> Deserialize<'de> for DmConfig
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
Auto Trait Implementations§
impl Freeze for DmConfig
impl RefUnwindSafe for DmConfig
impl Send for DmConfig
impl Sync for DmConfig
impl Unpin for DmConfig
impl UnsafeUnpin for DmConfig
impl UnwindSafe for DmConfig
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