pub struct ExpectedErrorMessage<'a> { /* private fields */ }Available on crate feature
test-util only.Expand description
Describes the contents of an error message. Fields are based on the contents
of miette::Diagnostic.
Implementations§
Source§impl<'a> ExpectedErrorMessage<'a>
impl<'a> ExpectedErrorMessage<'a>
Sourcepub fn matches(&self, error: &impl Diagnostic) -> bool
pub fn matches(&self, error: &impl Diagnostic) -> bool
Return a boolean indicating whether a given error matches this expected message.
(If you want to assert that it matches, use expect_err() instead,
for much better assertion-failure messages.)
Trait Implementations§
Source§impl<'a> Debug for ExpectedErrorMessage<'a>
impl<'a> Debug for ExpectedErrorMessage<'a>
Auto Trait Implementations§
impl<'a> Freeze for ExpectedErrorMessage<'a>
impl<'a> RefUnwindSafe for ExpectedErrorMessage<'a>
impl<'a> Send for ExpectedErrorMessage<'a>
impl<'a> Sync for ExpectedErrorMessage<'a>
impl<'a> Unpin for ExpectedErrorMessage<'a>
impl<'a> UnsafeUnpin for ExpectedErrorMessage<'a>
impl<'a> UnwindSafe for ExpectedErrorMessage<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more