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 human draft event.

Returns Some(GameEvent::DraftHuman(_)) if the entry matches any of:

  • A Draft.Notify pack presentation
  • An EventPlayerDraftMakePick pick selection

Returns None if the entry does not match any human draft signature.

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.