pub struct ReceiptDifference<'a> {
pub index: usize,
pub expected: Option<&'a ScenarioReceiptEvent>,
pub actual: Option<&'a ScenarioReceiptEvent>,
}Expand description
The first unequal event, or the first event missing from one receipt.
The events are borrowed in full, including identifiers beyond the diagnostic
display limit. Display and Debug show only this position, in expected /
actual order, with virtual time in nanoseconds and the finite event enums.
Each identifier is escaped and limited to 128 escaped ASCII bytes, followed
by ... if truncated. Both formats produce fewer than 1024 bytes regardless
of receipt length or identifier length, including directly constructed events
that bypass the recorder’s identifier validation. This is output bounding,
not secret redaction; use only test-owned, non-sensitive identifiers.
Fields§
§index: usizeZero-based index of the first difference.
expected: Option<&'a ScenarioReceiptEvent>Expected event at this position, or None if the expected receipt ended.
actual: Option<&'a ScenarioReceiptEvent>Actual event at this position, or None if the actual receipt ended.
Trait Implementations§
Source§impl<'a> Clone for ReceiptDifference<'a>
impl<'a> Clone for ReceiptDifference<'a>
impl<'a> Copy for ReceiptDifference<'a>
Source§impl Debug for ReceiptDifference<'_>
impl Debug for ReceiptDifference<'_>
Source§impl Display for ReceiptDifference<'_>
impl Display for ReceiptDifference<'_>
impl<'a> Eq for ReceiptDifference<'a>
Source§impl<'a> PartialEq for ReceiptDifference<'a>
impl<'a> PartialEq for ReceiptDifference<'a>
impl<'a> StructuralPartialEq for ReceiptDifference<'a>
Auto Trait Implementations§
impl<'a> Freeze for ReceiptDifference<'a>
impl<'a> RefUnwindSafe for ReceiptDifference<'a>
impl<'a> Send for ReceiptDifference<'a>
impl<'a> Sync for ReceiptDifference<'a>
impl<'a> Unpin for ReceiptDifference<'a>
impl<'a> UnsafeUnpin for ReceiptDifference<'a>
impl<'a> UnwindSafe for ReceiptDifference<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.