pub trait TestResultExt: Sized {
// Required methods
fn expect_value_eq<T: IntoValue>(self, value: T) -> Result;
fn expect_shell_error(self) -> Result<ShellError>;
fn expect_parse_error(self) -> Result<ParseError>;
fn expect_compile_error(self) -> Result<CompileError>;
fn expect_io_error(self) -> Result<IoError>;
fn expect_network_error(self) -> Result<NetworkError>;
fn expect_labeled_error(self) -> Result<LabeledError>;
// Provided method
fn expect_error(self) -> Result<ShellError> { ... }
}Expand description
Extensions for asserting error kinds from test helpers.
Required Methods§
Sourcefn expect_value_eq<T: IntoValue>(self, value: T) -> Result
fn expect_value_eq<T: IntoValue>(self, value: T) -> Result
Expect the result to be a Value equal to the provided input.
Sourcefn expect_shell_error(self) -> Result<ShellError>
fn expect_shell_error(self) -> Result<ShellError>
Expect the result to be a ShellError.
Sourcefn expect_parse_error(self) -> Result<ParseError>
fn expect_parse_error(self) -> Result<ParseError>
Expect the result to be a ParseError.
Sourcefn expect_compile_error(self) -> Result<CompileError>
fn expect_compile_error(self) -> Result<CompileError>
Expect the result to be a CompileError.
Sourcefn expect_io_error(self) -> Result<IoError>
fn expect_io_error(self) -> Result<IoError>
Expect the result to be a ShellError::Io.
Sourcefn expect_network_error(self) -> Result<NetworkError>
fn expect_network_error(self) -> Result<NetworkError>
Expect the result to be a ShellError::Network.
Sourcefn expect_labeled_error(self) -> Result<LabeledError>
fn expect_labeled_error(self) -> Result<LabeledError>
Expect the result to be a ShellError::LabeledError.
Provided Methods§
Sourcefn expect_error(self) -> Result<ShellError>
fn expect_error(self) -> Result<ShellError>
Expect the result to be a ShellError.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".