pub enum DiscardEvent {
MessageDiscard {
base: BaseEvent,
queue_id: String,
recipient: String,
relay: String,
delay: f64,
delays: DelayBreakdown,
dsn: String,
status: String,
discard_reason: String,
},
Configuration {
base: BaseEvent,
config_type: DiscardConfigType,
details: String,
},
}Expand description
DISCARD组件事件类型 基于Postfix源码和真实生产数据分析 DISCARD是“假装投递“的邮件丢弃代理,不进行实际网络投递
Variants§
MessageDiscard
邮件丢弃事件 - DISCARD的主要功能,假装投递但实际丢弃
Fields
§
delays: DelayBreakdown延迟时间细分 (queue/conn_setup/conn/transmission)
Configuration
配置事件 - DISCARD代理的配置相关事件
Implementations§
Source§impl DiscardEvent
impl DiscardEvent
Sourcepub fn discard_reason(&self) -> Option<&str>
pub fn discard_reason(&self) -> Option<&str>
获取丢弃原因
Sourcepub fn is_message_discard(&self) -> bool
pub fn is_message_discard(&self) -> bool
判断是否为邮件丢弃事件
Sourcepub fn is_successful_discard(&self) -> bool
pub fn is_successful_discard(&self) -> bool
检查是否为成功的丢弃操作
Trait Implementations§
Source§impl Clone for DiscardEvent
impl Clone for DiscardEvent
Source§fn clone(&self) -> DiscardEvent
fn clone(&self) -> DiscardEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DiscardEvent
impl Debug for DiscardEvent
Source§impl<'de> Deserialize<'de> for DiscardEvent
impl<'de> Deserialize<'de> for DiscardEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DiscardEvent
impl RefUnwindSafe for DiscardEvent
impl Send for DiscardEvent
impl Sync for DiscardEvent
impl Unpin for DiscardEvent
impl UnwindSafe for DiscardEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more