pub enum RelayEvent {
DeliveryStatus {
base: BaseEvent,
queue_id: String,
recipient: String,
relay_host: String,
relay_ip: Option<IpAddr>,
relay_port: Option<u16>,
delay: f64,
delays: DelayBreakdown,
dsn: String,
status: DeliveryStatus,
status_description: String,
},
ConnectionIssue {
base: BaseEvent,
queue_id: String,
recipient: String,
relay_host: String,
relay_ip: Option<IpAddr>,
issue_type: ConnectionIssueType,
error_message: String,
},
RelayConfiguration {
base: BaseEvent,
config_type: RelayConfigType,
details: String,
},
}
Expand description
RELAY组件事件类型 基于Postfix源码和真实生产数据分析
Variants§
DeliveryStatus
邮件投递状态 - 占95%+的relay日志
ConnectionIssue
连接问题事件
Fields
§
issue_type: ConnectionIssueType
RelayConfiguration
中继配置事件
Implementations§
Source§impl RelayEvent
impl RelayEvent
Sourcepub fn relay_host(&self) -> Option<&str>
pub fn relay_host(&self) -> Option<&str>
获取中继主机(如果存在)
Sourcepub fn is_successful_delivery(&self) -> bool
pub fn is_successful_delivery(&self) -> bool
判断是否为投递成功事件
Sourcepub fn is_connection_issue(&self) -> bool
pub fn is_connection_issue(&self) -> bool
判断是否为连接问题
Trait Implementations§
Source§impl Clone for RelayEvent
impl Clone for RelayEvent
Source§fn clone(&self) -> RelayEvent
fn clone(&self) -> RelayEvent
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 RelayEvent
impl Debug for RelayEvent
Source§impl<'de> Deserialize<'de> for RelayEvent
impl<'de> Deserialize<'de> for RelayEvent
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 RelayEvent
impl RefUnwindSafe for RelayEvent
impl Send for RelayEvent
impl Sync for RelayEvent
impl Unpin for RelayEvent
impl UnwindSafe for RelayEvent
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