This commit is contained in:
Mauro D 2024-01-31 18:31:14 -03:00
parent de59c61112
commit e39724159e
2 changed files with 10 additions and 1 deletions

View file

@ -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"]

View file

@ -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 },
@ -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],