aboutsummaryrefslogtreecommitdiff
path: root/src/filters/log.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/filters/log.rs')
-rw-r--r--src/filters/log.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/filters/log.rs b/src/filters/log.rs
index ded4c44..8b84bf3 100644
--- a/src/filters/log.rs
+++ b/src/filters/log.rs
@@ -47,6 +47,18 @@ impl OutcomeFilter {
pub fn new(outcomes: HashSet<FightOutcome>) -> Box<dyn LogFilter> {
Box::new(OutcomeFilter(outcomes))
}
+
+ pub fn success() -> Box<dyn LogFilter> {
+ let mut outcomes = HashSet::new();
+ outcomes.insert(FightOutcome::Success);
+ Self::new(outcomes)
+ }
+
+ pub fn wipe() -> Box<dyn LogFilter> {
+ let mut outcomes = HashSet::new();
+ outcomes.insert(FightOutcome::Wipe);
+ Self::new(outcomes)
+ }
}
impl Filter<PartialEvtc, LogResult> for OutcomeFilter {