is_valid_client_id

Function is_valid_client_id 

Source
pub fn is_valid_client_id(client_id: &str) -> bool
Expand description

Validates an MQTT client identifier according to MQTT v5.0 specification

ยงRules:

  • Must be UTF-8 encoded
  • Must contain only characters: 0-9, a-z, A-Z
  • Must be between 1 and 23 bytes (unless server supports longer)
  • Empty string is allowed (server will assign one)