Skip to main content

try_parse

Function try_parse 

Source
pub fn try_parse(
    entry: &LogEntry,
    timestamp: Option<DateTime<Utc>>,
) -> Option<GameEvent>
Expand description

Attempts to parse a LogEntry as a session event.

Returns Some(GameEvent::Session(_)) if the entry matches one of the two recognized session signatures, or None if the entry is not a session event.

The timestamp is None when the log entry header did not contain a parseable timestamp. It is passed through to EventMetadata so downstream consumers can distinguish real vs missing timestamps.