async fn enforce_register_first(
cmd: &Command,
registered_kind: &Option<ClientKind>,
) -> Option<Event>Expand description
Enforce the “first message must be Register” invariant. Returns
Some(Event::Error) if the command violates the contract; the
caller sends it and closes the connection.