pub struct BaseEvent {
pub timestamp: DateTime<Utc>,
pub hostname: String,
pub component: String,
pub process_id: u32,
pub log_level: PostfixLogLevel,
pub raw_message: String,
}Expand description
基础事件信息 包含所有Postfix事件的通用字段
Fields§
§timestamp: DateTime<Utc>日志时间戳(UTC时间) 从日志行开头解析的时间信息,统一转换为UTC时间格式
hostname: String主机名(产生日志的服务器名称) 从日志行第二个字段提取,用于标识日志来源服务器
component: String组件名称(Postfix组件标识) 如smtpd、qmgr、smtp等,对应Postfix架构中的不同模块
process_id: u32进程ID(组件进程的系统标识符) 从方括号内提取,用于区分同一组件的不同进程实例
log_level: PostfixLogLevel日志等级(消息的重要程度分类) 基于Postfix源码中的消息等级分类系统
raw_message: String原始消息内容(冒号后的完整消息文本) 保留原始格式,用于组件特定的解析和调试
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BaseEvent
impl<'de> Deserialize<'de> for BaseEvent
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
impl StructuralPartialEq for BaseEvent
Auto Trait Implementations§
impl Freeze for BaseEvent
impl RefUnwindSafe for BaseEvent
impl Send for BaseEvent
impl Sync for BaseEvent
impl Unpin for BaseEvent
impl UnwindSafe for BaseEvent
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