pub struct AnvilEvent {
pub timestamp: DateTime<Utc>,
pub pid: Option<u32>,
pub event_type: AnvilEventType,
}Expand description
Anvil连接计数器事件
记录Postfix anvil服务的连接统计和配置警告信息
Fields§
§timestamp: DateTime<Utc>事件发生时间戳(UTC时间)
pid: Option<u32>进程ID(可选) anvil进程的系统标识符,某些情况下可能为空
event_type: AnvilEventType事件类型(配置警告或统计信息)
Implementations§
Source§impl AnvilEvent
impl AnvilEvent
pub fn new( timestamp: DateTime<Utc>, pid: Option<u32>, event_type: AnvilEventType, ) -> Self
pub fn config_warning( timestamp: DateTime<Utc>, pid: Option<u32>, file_path: String, line_number: u32, parameter_name: String, message: String, ) -> Self
pub fn statistics( timestamp: DateTime<Utc>, pid: Option<u32>, metric_type: StatisticType, value: u32, rate_window: Option<String>, service_client: String, metric_timestamp: DateTime<Utc>, ) -> Self
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Get a human-readable description of the event
Trait Implementations§
Source§impl Clone for AnvilEvent
impl Clone for AnvilEvent
Source§fn clone(&self) -> AnvilEvent
fn clone(&self) -> AnvilEvent
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 AnvilEvent
impl Debug for AnvilEvent
Source§impl<'de> Deserialize<'de> for AnvilEvent
impl<'de> Deserialize<'de> for AnvilEvent
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
Source§impl PartialEq for AnvilEvent
impl PartialEq for AnvilEvent
Source§impl Serialize for AnvilEvent
impl Serialize for AnvilEvent
impl StructuralPartialEq for AnvilEvent
Auto Trait Implementations§
impl Freeze for AnvilEvent
impl RefUnwindSafe for AnvilEvent
impl Send for AnvilEvent
impl Sync for AnvilEvent
impl Unpin for AnvilEvent
impl UnwindSafe for AnvilEvent
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