Skip to main content

args

Function args 

Source
pub fn args() -> Result<Vec<CString>>
Expand description

Parses command line arguments and returns them as a vector of CString.

§Arguments

This function does not take parameters; it reads env::args() for the current process command line.

§Errors

This function will return an Err if no command is provided, if the command is not found, if it is not executable, or if there is an error converting arguments to CString.

§Returns

Returns a Result containing a vector of CString representing the command line arguments, or an Err if there was an error.