pub struct TrivialRewriteEvent {
pub timestamp: DateTime<Utc>,
pub pid: Option<u32>,
pub event_type: TrivialRewriteEventType,
}Expand description
Trivial-rewrite地址重写事件
记录地址重写和解析组件的配置警告和域名冲突信息
Fields§
§timestamp: DateTime<Utc>事件发生时间戳(UTC时间)
pid: Option<u32>进程ID(可选) trivial-rewrite进程的系统标识符
event_type: TrivialRewriteEventType事件类型(配置覆盖警告或域名配置警告)
Implementations§
Source§impl TrivialRewriteEvent
impl TrivialRewriteEvent
pub fn new( timestamp: DateTime<Utc>, pid: Option<u32>, event_type: TrivialRewriteEventType, ) -> Self
pub fn config_override_warning( timestamp: DateTime<Utc>, pid: Option<u32>, file_path: String, line_number: u32, parameter_name: String, parameter_value: String, ) -> Self
pub fn domain_config_warning( timestamp: DateTime<Utc>, pid: Option<u32>, domain: String, domain_list1: String, domain_list2: String, message: String, ) -> Self
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Get a human-readable description of the event
Sourcepub fn parameter_name(&self) -> Option<&str>
pub fn parameter_name(&self) -> Option<&str>
Get the configuration parameter name if applicable
Trait Implementations§
Source§impl Clone for TrivialRewriteEvent
impl Clone for TrivialRewriteEvent
Source§fn clone(&self) -> TrivialRewriteEvent
fn clone(&self) -> TrivialRewriteEvent
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 TrivialRewriteEvent
impl Debug for TrivialRewriteEvent
Source§impl<'de> Deserialize<'de> for TrivialRewriteEvent
impl<'de> Deserialize<'de> for TrivialRewriteEvent
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 TrivialRewriteEvent
impl PartialEq for TrivialRewriteEvent
Source§impl Serialize for TrivialRewriteEvent
impl Serialize for TrivialRewriteEvent
impl StructuralPartialEq for TrivialRewriteEvent
Auto Trait Implementations§
impl Freeze for TrivialRewriteEvent
impl RefUnwindSafe for TrivialRewriteEvent
impl Send for TrivialRewriteEvent
impl Sync for TrivialRewriteEvent
impl Unpin for TrivialRewriteEvent
impl UnwindSafe for TrivialRewriteEvent
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