Skip to main content

parse

Function parse 

Source
fn parse(input: &str) -> Option<Command>
Expand description

Parses a command string into a Command struct.

Commands use colon between the command category and the actual command, making parsing very simple and easy to do.

§Arguments

  • input - A string slice that holds the command input.

§Returns

  • Option<Command> - Returns Some(Command) if parsing is successful, or None if the input is empty.