pub struct Const<R>(pub R);Tuple Fields§
§0: RTrait Implementations§
Source§impl<R> Differ for Const<R>
impl<R> Differ for Const<R>
Source§fn begin_struct(self, _: &'static str) -> Self::StructDiffer
fn begin_struct(self, _: &'static str) -> Self::StructDiffer
Begin traversing a struct.
Source§type StructDiffer = Const<R>
type StructDiffer = Const<R>
The type we turn into when diffing a struct.
Source§type StructVariantDiffer = Const<R>
type StructVariantDiffer = Const<R>
The type we turn into when diffing a struct variant of an enum. Read more
Source§type TupleDiffer = Const<R>
type TupleDiffer = Const<R>
The type we turn into when diffing a tuple or tuple struct.
Source§type TupleVariantDiffer = Const<R>
type TupleVariantDiffer = Const<R>
The type we turn into when diffing a tuple variant of an enum. Read more
Source§fn difference(self, _: &dyn Debug, _: &dyn Debug) -> Result<Self::Ok, Self::Err>
fn difference(self, _: &dyn Debug, _: &dyn Debug) -> Result<Self::Ok, Self::Err>
Two atomic values have been discovered to be different, such as
different numbers or different variants of an enum.
Source§fn same(self, _: &dyn Debug, _: &dyn Debug) -> Result<Self::Ok, Self::Err>
fn same(self, _: &dyn Debug, _: &dyn Debug) -> Result<Self::Ok, Self::Err>
Two atomic values are the same, such as equal numbers or identical unit
variants of an enum.
Source§fn diff_newtype<T>(
self,
_: &'static str,
_: &T,
_: &T,
) -> Result<Self::Ok, Self::Err>
fn diff_newtype<T>( self, _: &'static str, _: &T, _: &T, ) -> Result<Self::Ok, Self::Err>
Encounter a newtype.
a and b are the contents of the sole fields of
the left-hand and right-hand value, respectively.Source§fn begin_struct_variant(
self,
_: &'static str,
_: &'static str,
) -> Self::StructVariantDiffer
fn begin_struct_variant( self, _: &'static str, _: &'static str, ) -> Self::StructVariantDiffer
Begin traversing a struct variant of an enum. Read more
Source§fn begin_tuple(self, _: &'static str) -> Self::TupleDiffer
fn begin_tuple(self, _: &'static str) -> Self::TupleDiffer
Begin traversing a tuple struct or raw tuple. Read more
Source§fn begin_tuple_variant(
self,
_: &'static str,
_: &'static str,
) -> Self::TupleVariantDiffer
fn begin_tuple_variant( self, _: &'static str, _: &'static str, ) -> Self::TupleVariantDiffer
Begin traversing a tuple variant of an enum. Read more
Source§impl<R> MapDiffer for Const<R>
impl<R> MapDiffer for Const<R>
Source§fn diff_entry<K, V>(&mut self, _: &K, _: &V, _: &V)
fn diff_entry<K, V>(&mut self, _: &K, _: &V, _: &V)
Both maps contain entries for
key; check them for differences.Source§fn only_in_left<K, V>(&mut self, _: &K, _: &V)
fn only_in_left<K, V>(&mut self, _: &K, _: &V)
Key
key is only present in the left map, with value a.Source§fn only_in_right<K, V>(&mut self, _: &K, _: &V)
fn only_in_right<K, V>(&mut self, _: &K, _: &V)
Key
key is only present in the right map, with value b.Source§impl<R> SeqDiffer for Const<R>
impl<R> SeqDiffer for Const<R>
Source§fn diff_element<T>(&mut self, _: &T, _: &T)
fn diff_element<T>(&mut self, _: &T, _: &T)
We’ve found elements in corresponding positions in both sequences.
Source§fn diff_elements<T, I>(&mut self, _: I, _: I)where
T: Diff,
I: IntoIterator<Item = T>,
fn diff_elements<T, I>(&mut self, _: I, _: I)where
T: Diff,
I: IntoIterator<Item = T>,
Consumes two iterators, diffing their contents. This is a convenience
method implemented in terms of the others.
Source§fn left_excess<T>(&mut self, _: &T)
fn left_excess<T>(&mut self, _: &T)
We’ve found an element that only appears in the left-hand sequence.
Source§fn right_excess<T>(&mut self, _: &T)
fn right_excess<T>(&mut self, _: &T)
We’ve found an element that only appears in the right-hand sequence.
Source§impl<R> SetDiffer for Const<R>
impl<R> SetDiffer for Const<R>
Source§fn diff_equal<V>(&mut self, _: &V, _: &V)
fn diff_equal<V>(&mut self, _: &V, _: &V)
The sets contain
a and b which compare as equal. Check them for
differences.Source§fn only_in_left<V>(&mut self, _: &V)
fn only_in_left<V>(&mut self, _: &V)
Value
a is only in the left-hand set.Source§fn only_in_right<V>(&mut self, _: &V)
fn only_in_right<V>(&mut self, _: &V)
Value
b is only in the right-hand set.Source§impl<R> StructDiffer for Const<R>
impl<R> StructDiffer for Const<R>
Source§impl<R> TupleDiffer for Const<R>
impl<R> TupleDiffer for Const<R>
Source§fn diff_field<T>(&mut self, _: &T, _: &T)
fn diff_field<T>(&mut self, _: &T, _: &T)
Visits the next field in each tuple. The field number is implicit.
Source§fn skip_field<T: ?Sized>(&mut self)
fn skip_field<T: ?Sized>(&mut self)
Signals that a field is being skipped. Some differs may do something
with this information.
Auto Trait Implementations§
impl<R> Freeze for Const<R>where
R: Freeze,
impl<R> RefUnwindSafe for Const<R>where
R: RefUnwindSafe,
impl<R> Send for Const<R>where
R: Send,
impl<R> Sync for Const<R>where
R: Sync,
impl<R> Unpin for Const<R>where
R: Unpin,
impl<R> UnwindSafe for Const<R>where
R: UnwindSafe,
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