pub struct DiscardParser { /* private fields */ }
Expand description
DISCARD组件解析器
基于Postfix DISCARD邮件丢弃代理的真实日志格式开发 DISCARD代理的特点:
- 假装投递但实际丢弃邮件
- 总是报告relay=nonediscard
- 状态总是为sent,但DSN为2.0.0表示成功丢弃
- 不进行实际网络投递,延迟时间通常很短
Implementations§
Source§impl DiscardParser
impl DiscardParser
pub fn new() -> Self
Sourcepub fn parse_line(
&self,
line: &str,
base_event: BaseEvent,
) -> Option<DiscardEvent>
pub fn parse_line( &self, line: &str, base_event: BaseEvent, ) -> Option<DiscardEvent>
解析DISCARD日志行
Trait Implementations§
Source§impl ComponentParser for DiscardParser
impl ComponentParser for DiscardParser
Auto Trait Implementations§
impl Freeze for DiscardParser
impl RefUnwindSafe for DiscardParser
impl Send for DiscardParser
impl Sync for DiscardParser
impl Unpin for DiscardParser
impl UnwindSafe for DiscardParser
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> 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