forward filters (ugly)
This commit is contained in:
parent
1f6679f57f
commit
de51666742
8 changed files with 167 additions and 97 deletions
|
|
@ -25,7 +25,7 @@ mod serialize_regex {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub enum MatcherValue {
|
||||
Exact(String),
|
||||
Regex(#[serde(with = "serialize_regex")] Regex),
|
||||
|
|
@ -53,7 +53,7 @@ impl MatcherValue {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub enum Matcher {
|
||||
Field { name: String, value: MatcherValue },
|
||||
Message { value: MatcherValue },
|
||||
|
|
@ -98,13 +98,13 @@ impl Matcher {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
#[derive(Clone, Serialize, Deserialize, Debug)]
|
||||
pub enum FilterKind {
|
||||
Inline,
|
||||
Remove,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct Filter {
|
||||
pub matcher: Matcher,
|
||||
pub kind: FilterKind,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue