1use serde::{Deserialize, Serialize};
23/// Represents bcc settings for an email message.
4///
5/// The specified email will receive a blind carbon copy (BCC) of
6/// the very first personalization defined for an email message.
7#[derive(Debug, Default, Clone, Serialize, Deserialize)]
8pub struct BccSettings {
9/// The value indicating whether this setting is enabled.
10pub enable: bool,
11/// The email address that will receive the BCC.
12pub email: String,
13}
1415#[cfg(test)]
16mod tests {
17use super::*;
18use serde_json::to_string;
1920#[test]
21fn it_serializes_to_json() {
22let json = to_string(&BccSettings {
23 enable: true,
24 email: "foo@example.com".to_owned(),
25 })
26 .unwrap();
2728assert_eq!(json, r#"{"enable":true,"email":"foo@example.com"}"#);
29 }
30}