1mod edit;
2mod test;
3
4pub use self::edit::*;
5pub use self::test::*;
6
7#[derive(Clone, Debug, Default, PartialEq)]
8#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
9pub struct Match {
10 pub target: MatchTarget,
11 pub tests: Vec<Test>,
12 pub edits: Vec<Edit>,
13}
14
15#[derive(Clone, Copy, Debug, PartialEq, Eq)]
16#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
17pub enum MatchTarget {
18 Pattern,
19 Font,
20 Scan,
21}
22
23parse_enum! {
24 MatchTarget,
25 (Pattern, "pattern"),
26 (Font, "font"),
27 (Scan, "scan"),
28}
29
30impl Default for MatchTarget {
31 fn default() -> Self {
32 MatchTarget::Pattern
33 }
34}
35