Remove serdex feature proxy
This commit is contained in:
parent
1d64997b3d
commit
29dc6ceab4
|
@ -7,13 +7,7 @@ repository = "https://github.com/InstantDomain/instant-smtp"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[features]
|
|
||||||
default = []
|
|
||||||
serdex = ["serde"]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nom = "7"
|
nom = "7"
|
||||||
abnf-core = "0.5"
|
abnf-core = "0.5"
|
||||||
|
|
||||||
# Optional
|
|
||||||
serde = { version = "1.0", features = ["derive"], optional = true }
|
serde = { version = "1.0", features = ["derive"], optional = true }
|
||||||
|
|
12
src/types.rs
12
src/types.rs
|
@ -1,6 +1,6 @@
|
||||||
use std::{borrow::Cow, fmt, io::Write, ops::Deref};
|
use std::{borrow::Cow, fmt, io::Write, ops::Deref};
|
||||||
|
|
||||||
#[cfg(feature = "serdex")]
|
#[cfg(feature = "serde")]
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::{parse::response::is_text_string_byte, utils::escape_quoted};
|
use crate::{parse::response::is_text_string_byte, utils::escape_quoted};
|
||||||
|
@ -287,7 +287,7 @@ impl AtomOrQuoted {
|
||||||
|
|
||||||
// -------------------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
#[cfg_attr(feature = "serdex", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub enum Response {
|
pub enum Response {
|
||||||
|
@ -406,7 +406,7 @@ impl Response {
|
||||||
|
|
||||||
// -------------------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
#[cfg_attr(feature = "serdex", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub enum Capability {
|
pub enum Capability {
|
||||||
|
@ -589,7 +589,7 @@ impl Capability {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(feature = "serdex", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq, PartialOrd, Ord)]
|
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq, PartialOrd, Ord)]
|
||||||
pub enum ReplyCode {
|
pub enum ReplyCode {
|
||||||
/// 211 System status, or system help reply
|
/// 211 System status, or system help reply
|
||||||
|
@ -747,7 +747,7 @@ impl From<ReplyCode> for u16 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(feature = "serdex", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub enum AuthMechanism {
|
pub enum AuthMechanism {
|
||||||
|
@ -783,7 +783,7 @@ impl AuthMechanism {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A string containing of tab, space and printable ASCII characters
|
/// A string containing of tab, space and printable ASCII characters
|
||||||
#[cfg_attr(feature = "serdex", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
pub struct TextString<'a>(pub(crate) Cow<'a, str>);
|
pub struct TextString<'a>(pub(crate) Cow<'a, str>);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue