• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jtmoon79 / super-speedy-syslog-searcher / 20603980203

30 Dec 2025 07:10PM UTC coverage: 67.773% (-2.0%) from 69.779%
20603980203

push

github

jtmoon79
(CI) s4_* --venv

15621 of 23049 relevant lines covered (67.77%)

123479.17 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

87.5
/src/data/common.rs
1
// src/data/common.rs
2

3
//! Common types and constants for `readers`.
4

5
use crate::data::datetime::DateTimeL;
6
use crate::data::evtx::Evtx;
7
use crate::data::fixedstruct::FixedStruct;
8
use crate::data::journal::JournalEntry;
9
use crate::data::pydataevent::PyDataEvent;
10
use crate::data::sysline::SyslineP;
11
use crate::readers::pyeventreader::PyEventType;
12

13
/// The type of log message sent from file processing thread to the main
14
/// printing thread enclosing the specific message.
15
#[derive(Debug)]
16
pub enum LogMessage {
17
    // TODO: reorder in alphabetical order
18
    Sysline(SyslineP),
19
    FixedStruct(FixedStruct),
20
    Evtx(Evtx),
21
    Journal(JournalEntry),
22
    PyEvent(PyDataEvent, PyEventType),
23
}
24
pub type LogMessageOpt = Option<LogMessage>;
25

26
impl LogMessage {
27
    /// Returns the datetime of the log message.
28
    pub fn dt(&self) -> &DateTimeL {
384,020✔
29
        match self {
384,020✔
30
            // TODO: reorder in alphabetical order
31
            LogMessage::Sysline(sysline) => sysline.dt(),
113,080✔
32
            LogMessage::FixedStruct(fixedstruct) => fixedstruct.dt(),
72,180✔
33
            LogMessage::Evtx(evtx) => evtx.dt(),
20,300✔
34
            LogMessage::Journal(journal) => journal.dt(),
178,460✔
35
            LogMessage::PyEvent(pyevent, ..) => pyevent.dt(),
×
36
        }
37
    }
384,020✔
38
}
39

40
/// Bytes offsets of the beginning and end of the
41
/// datetime substring within a `String`.
42
// TODO: change to a typed `struct DtBegEndPair(usize, usize)`
43
pub type DtBegEndPair = (usize, usize);
44

45
/// [`Option`] of [`DtBegEndPair`].
46
pub type DtBegEndPairOpt = Option<DtBegEndPair>;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc