check_mikrotik_command

Function check_mikrotik_command 

Source
pub const fn check_mikrotik_command(cmd: &str) -> &str
Expand description

A minimal const validator that enforces some basic MikroTik command rules:

  1. Must start with /.
  2. No empty segments (no //).
  3. Only allows [a-zA-Z0-9_-] plus space or slash as separators.
  4. No consecutive spaces or slashes.

Panics at compile time if invalid.