postfix_log_parser/components/
virtual_parser.rs1use crate::components::ComponentParser;
4use crate::error::ParseError;
5use crate::events::ComponentEvent;
6
7pub struct VirtualParser;
9
10impl VirtualParser {
11 pub fn new() -> Self {
12 Self
13 }
14}
15
16impl ComponentParser for VirtualParser {
17 fn parse(&self, _message: &str) -> Result<ComponentEvent, ParseError> {
18 Err(ParseError::ComponentParseError {
20 component: "virtual".to_string(),
21 reason: "virtual解析器尚未实现".to_string(),
22 })
23 }
24
25 fn component_name(&self) -> &'static str {
26 "virtual"
27 }
28}
29
30impl Default for VirtualParser {
31 fn default() -> Self {
32 Self::new()
33 }
34}