1use serde_derive::Deserialize;
3
4pub const REDACT_PLACEHOLDER: &str = "[TEXT_REDACTED]";
6
7#[derive(Debug, Deserialize, Clone)]
8pub struct Pattern {
10 #[serde(with = "serde_regex")]
11 pub test: regex::Regex,
13 pub group: usize,
15}
16
17#[derive(Debug, Deserialize, Clone)]
18pub struct Info {
20 pub string: String,
22 pub captures: Vec<Captures>,
24}
25
26#[derive(Debug, Deserialize, Clone)]
27pub struct Captures {
29 pub text: String,
31 pub test: String,
33 pub position: Option<Position>,
35}
36
37#[derive(Debug, Deserialize, Clone)]
38pub struct Position {
39 pub line: usize,
41 pub start_offset: usize,
43 pub end_offset: usize,
45}