aboutsummaryrefslogtreecommitdiff
path: root/src/filters
diff options
context:
space:
mode:
Diffstat (limited to 'src/filters')
-rw-r--r--src/filters/player.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/filters/player.rs b/src/filters/player.rs
index 2b14eb0..d3185e0 100644
--- a/src/filters/player.rs
+++ b/src/filters/player.rs
@@ -3,7 +3,7 @@
//! Additionally, it provides methods to lift a player filter to a log filter with [`any`][any] and
//! [`all`][all].
use super::{
- super::{guilds, playerclass::PlayerClass, EarlyLogResult, LogResult, Player, SearchField},
+ super::{guilds, playerclass::PlayerClass, EarlyLogResult, LogResult, Player},
log::LogFilter,
Filter, Inclusion,
};
@@ -61,6 +61,17 @@ pub fn any(player_filter: Box<dyn PlayerFilter>) -> Box<dyn LogFilter> {
!all(!player_filter)
}
+/// A flag indicating which fields should be searched.
+#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
+pub enum SearchField {
+ /// Only search the account name.
+ Account,
+ /// Only search the character name.
+ Character,
+ /// Only search the guild name or tag.
+ Guild,
+}
+
/// Filter that filters players according to their name.
///
/// The given SearchField determines in which field something should be searched.