Skip to main content

lookup_command

Function lookup_command 

Source
pub const fn lookup_command(code: u32) -> Option<&'static CommandMeta>
Expand description

Lookup command metadata by command code.

Uses a match (compiled to a jump table / binary search) for O(1) lookup instead of linear scan. The match maps code -> table index, keeping COMMAND_TABLE as the single source of truth for all metadata.