summaryrefslogtreecommitdiffstats
path: root/src/modules/list/search/line_match.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/list/search/line_match.rs')
-rw-r--r--src/modules/list/search/line_match.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/modules/list/search/line_match.rs b/src/modules/list/search/line_match.rs
new file mode 100644
index 0000000..f9618cd
--- /dev/null
+++ b/src/modules/list/search/line_match.rs
@@ -0,0 +1,24 @@
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
+pub(crate) struct LineMatch {
+ index: usize,
+ hash: bool,
+ content: bool,
+}
+
+impl LineMatch {
+ pub(crate) const fn new(index: usize, hash: bool, content: bool) -> Self {
+ Self { index, hash, content }
+ }
+
+ pub(crate) const fn index(&self) -> usize {
+ self.index
+ }
+
+ pub(crate) const fn hash(&self) -> bool {
+ self.hash
+ }
+
+ pub(crate) const fn content(&self) -> bool {
+ self.content
+ }
+}