azure_functions/send_grid/bypass_list_management.rs
1use serde::{Deserialize, Serialize};
2
3/// Represents the ability to bypass list management for an email message.
4///
5/// This setting allows you to bypass all unsubscribe groups and suppressions to ensure
6/// that the email is delivered to every single recipient. This should only be used in
7/// emergencies when it is absolutely necessary that every recipient receives your email.
8#[derive(Debug, Default, Clone, Serialize, Deserialize)]
9pub struct BypassListManagement {
10 /// The value indicating whether this setting is enabled.
11 pub enable: bool,
12}
13
14#[cfg(test)]
15mod tests {
16 use super::*;
17 use serde_json::to_string;
18
19 #[test]
20 fn it_serializes_to_json() {
21 let json = to_string(&BypassListManagement { enable: true }).unwrap();
22
23 assert_eq!(json, r#"{"enable":true}"#);
24 }
25}