azure_functions/send_grid/
bcc_settings.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Default, Clone, Serialize, Deserialize)]
8pub struct BccSettings {
9 pub enable: bool,
11 pub email: String,
13}
14
15#[cfg(test)]
16mod tests {
17 use super::*;
18 use serde_json::to_string;
19
20 #[test]
21 fn it_serializes_to_json() {
22 let json = to_string(&BccSettings {
23 enable: true,
24 email: "foo@example.com".to_owned(),
25 })
26 .unwrap();
27
28 assert_eq!(json, r#"{"enable":true,"email":"foo@example.com"}"#);
29 }
30}