Skip to content

Commit

Permalink
v0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mdecimus committed Jan 31, 2024
1 parent de59c61 commit e397241
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ license = "Apache-2.0 OR MIT"
keywords = ["smtp", "lmtp", "protocol", "parser"]
categories = ["email", "parser-implementations"]
readme = "README.md"
version = "0.1.3"
version = "0.1.4"
edition = "2021"

[dependencies]
serde = { version = "1.0", features = ["derive"], optional = true }

[dev-dependencies]

[features]
default = []
serde_support = ["serde"]
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ pub mod request;
pub mod response;
mod tokens;

#[cfg(feature = "serde_support")]
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Request<T> {
Ehlo { host: T },
Expand Down Expand Up @@ -219,6 +222,7 @@ pub struct EhloResponse<T: Display> {
}

#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))]
pub struct Response<T: Display> {
pub code: u16,
pub esc: [u8; 3],
Expand Down

0 comments on commit e397241

Please sign in to comment.