pub struct InlineSnapshotFailure {
pub expected: String,
pub actual: String,
}Expand description
An inline snapshot did not match and UPDATE_SNAPSHOTS was unset.
Carries both sides so test-better-matchers can render it as an
expected/actual TestError with a diff, exactly like a file-backed
mismatch.
Fields§
§expected: StringThe normalized inline literal (what the source currently claims).
actual: StringThe value under test.
Trait Implementations§
Source§impl Debug for InlineSnapshotFailure
impl Debug for InlineSnapshotFailure
Source§impl Display for InlineSnapshotFailure
impl Display for InlineSnapshotFailure
Source§impl Error for InlineSnapshotFailure
impl Error for InlineSnapshotFailure
1.30.0 · 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 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for InlineSnapshotFailure
impl RefUnwindSafe for InlineSnapshotFailure
impl Send for InlineSnapshotFailure
impl Sync for InlineSnapshotFailure
impl Unpin for InlineSnapshotFailure
impl UnsafeUnpin for InlineSnapshotFailure
impl UnwindSafe for InlineSnapshotFailure
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