Skip to content

Commit

Permalink
Derive Clone for mail_send::smtp::message::{Message, Address, Paramet…
Browse files Browse the repository at this point in the history
…ers, Parameter}. (#33)
  • Loading branch information
janis-ab authored May 5, 2024
1 parent 164f18f commit 4eb4c3a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/smtp/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@ use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt};

use crate::SmtpClient;

#[derive(Debug, Default)]
#[derive(Debug, Default, Clone)]
pub struct Message<'x> {
pub mail_from: Address<'x>,
pub rcpt_to: Vec<Address<'x>>,
pub body: Cow<'x, [u8]>,
}

#[derive(Debug, Default)]
#[derive(Debug, Default, Clone)]
pub struct Address<'x> {
pub email: Cow<'x, str>,
pub parameters: Parameters<'x>,
}

#[derive(Debug, Default)]
#[derive(Debug, Default, Clone)]
pub struct Parameters<'x> {
params: Vec<Parameter<'x>>,
}

#[derive(Debug, Default)]
#[derive(Debug, Default, Clone)]
pub struct Parameter<'x> {
key: Cow<'x, str>,
value: Option<Cow<'x, str>>,
Expand Down

0 comments on commit 4eb4c3a

Please sign in to comment.