Skip to main content

BuiltinError

Trait BuiltinError 

Source
pub trait BuiltinError:
    Error
    + ConvertibleToExitCode
    + Send
    + Sync {
    // Provided method
    fn as_io_error(&self) -> Option<&Error> { ... }
}
Expand description

Trait implementable by built-in commands to represent errors.

Provided Methods§

Source

fn as_io_error(&self) -> Option<&Error>

Try to extract a reference to the underlying std::io::Error, if any. Implementations should return None if there is no inner I/O error. They should not attempt to synthesize an I/O error if one does not naturally exist.

Implementors§