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

Returns Some(GameEvent::DraftComplete(_)) if the entry matches the DraftCompleteDraft signature, or None if it does not match.

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.