#[non_exhaustive]pub enum AllureError {
Io(Error),
Serialization(Error),
Configuration(String),
NoActiveContext,
InvalidAttachment(String),
InvalidParameter(String),
}Expand description
Errors that can occur during Allure operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Io(Error)
I/O error occurred while reading or writing files.
Serialization(Error)
JSON serialization or deserialization error.
Configuration(String)
Configuration error with a descriptive message.
NoActiveContext
No active test context is available.
This error occurs when trying to add metadata or steps
outside of a test function wrapped with #[allure_test].
InvalidAttachment(String)
Invalid attachment error.
InvalidParameter(String)
Invalid parameter value.
Implementations§
Source§impl AllureError
impl AllureError
Sourcepub fn configuration(message: impl Into<String>) -> Self
pub fn configuration(message: impl Into<String>) -> Self
Creates a new configuration error.
Sourcepub fn invalid_attachment(message: impl Into<String>) -> Self
pub fn invalid_attachment(message: impl Into<String>) -> Self
Creates a new invalid attachment error.
Sourcepub fn invalid_parameter(message: impl Into<String>) -> Self
pub fn invalid_parameter(message: impl Into<String>) -> Self
Creates a new invalid parameter error.
Trait Implementations§
Source§impl Debug for AllureError
impl Debug for AllureError
Source§impl Display for AllureError
impl Display for AllureError
Source§impl Error for AllureError
impl Error for AllureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for AllureError
impl From<Error> for AllureError
Auto Trait Implementations§
impl Freeze for AllureError
impl !RefUnwindSafe for AllureError
impl Send for AllureError
impl Sync for AllureError
impl Unpin for AllureError
impl !UnwindSafe for AllureError
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more