Trait opencv::core::CommandLineParserTraitConst
source · pub trait CommandLineParserTraitConst {
// Required method
fn as_raw_CommandLineParser(&self) -> *const c_void;
// Provided methods
fn get_path_to_application(&self) -> Result<String> { ... }
fn has(&self, name: &str) -> Result<bool> { ... }
fn check(&self) -> Result<bool> { ... }
fn print_message(&self) -> Result<()> { ... }
fn print_errors(&self) -> Result<()> { ... }
}
Expand description
Constant methods for core::CommandLineParser
Required Methods§
fn as_raw_CommandLineParser(&self) -> *const c_void
Provided Methods§
sourcefn get_path_to_application(&self) -> Result<String>
fn get_path_to_application(&self) -> Result<String>
Returns application path
This method returns the path to the executable from the command line (argv[0]
).
For example, if the application has been started with such a command:
$ ./bin/my-executable
this method will return ./bin
.
sourcefn check(&self) -> Result<bool>
fn check(&self) -> Result<bool>
Check for parsing errors
Returns false if error occurred while accessing the parameters (bad conversion, missing arguments, etc.). Call [printErrors] to print error messages list.
sourcefn print_message(&self) -> Result<()>
fn print_message(&self) -> Result<()>
Print help message
This method will print standard help message containing the about message and arguments description.
See also
about