pub fn apply(state: Option<Record>, event: &Event) -> Result<Record, Error>
Apply one event to the current state.