Crate uucore[][src]

Modules

coreopts
panic
ranges

Macros

app
crash

Display the provided error message, then exit() with the provided exit code

crash_if_err

Unwraps the Result. Instead of panicking, it exists the program with the provided exit code.

executable

Deduce the name of the binary from the current source code filename.

exit

Calls exit() with the provided exit code.

msg_arg_invalid_value
msg_args_invalid_value
msg_args_nonexistent_file
msg_expects_no_more_than_one_of
msg_expects_one_of
msg_invalid_input
msg_invalid_opt_use
msg_opt_invalid_should_be
msg_opt_only_usable_if
msg_wrong_number_of_arguments
return_if_err

Unwraps the Result. Instead of panicking, it shows the error and then returns from the function with the provided exit code. Assumes the current function returns an i32 value.

safe_unwrap

Unwraps the Result. Instead of panicking, it exists the program with exit code 1.

safe_write
safe_writeln
show_error

Show an error to stderr in a silimar style to GNU coreutils.

show_info

Show an info message to stderr in a silimar style to GNU coreutils.

show_usage_error

Show a bad inocation help message in a similar style to GNU coreutils.

show_warning

Show a warning to stderr in a silimar style to GNU coreutils.

snippet_list_join_or
snippet_list_join_oxford
snippet_no_file_at_path

Traits

Args

Functions

args
args_os