pub enum CliError {
CommandNotFound,
InvalidPath,
InvalidArgumentCount {
expected_min: usize,
expected_max: usize,
received: usize,
},
InvalidArgumentFormat {
arg_index: usize,
expected: String<32>,
},
BufferFull,
PathTooDeep,
IoError,
Timeout,
CommandFailed(String<128>),
Other(String<128>),
}Expand description
CLI error type.
Represents all possible error conditions during command processing.
Error messages are designed to be user-friendly while maintaining security
(e.g., InvalidPath for both non-existent and inaccessible paths).
Variants§
CommandNotFound
Command not found in tree
InvalidPath
Path doesn’t exist OR user lacks access (intentionally ambiguous for security)
SECURITY: Never reveal whether path exists vs. access denied
InvalidArgumentCount
Wrong number of arguments
Fields
InvalidArgumentFormat
Invalid argument format/type (e.g., expected integer, got string)
Fields
BufferFull
Buffer capacity exceeded
PathTooDeep
Path exceeds MAX_PATH_DEPTH
IoError
I/O error occurred
Timeout
Operation timed out
CommandFailed(String<128>)
Command executed but reported failure
Other(String<128>)
Generic error with message
Trait Implementations§
impl Eq for CliError
impl StructuralPartialEq for CliError
Auto Trait Implementations§
impl Freeze for CliError
impl RefUnwindSafe for CliError
impl Send for CliError
impl Sync for CliError
impl Unpin for CliError
impl UnsafeUnpin for CliError
impl UnwindSafe for CliError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more