pub enum Comparison {
Child(FieldComparison),
Parent {
field_name: String,
equal: bool,
children: Vec<FieldComparison>,
},
}Variants§
Implementations§
Source§impl Comparison
impl Comparison
pub fn child<T: Debug + PartialEq<T>>(field_name: String, a: &T, b: &T) -> Self
pub fn parent( field_name: String, equal: bool, children: Vec<FieldComparison>, ) -> Self
pub fn from_slice<T: Debug + PartialEq<T>>( field_name: String, a: &[T], b: &[T], ) -> Self
pub fn from_into_iter<'a, T: Debug + PartialEq + 'a>( field_name: String, a: impl IntoIterator<Item = &'a T>, b: impl IntoIterator<Item = &'a T>, ) -> Self
pub fn from_iter<'a, T: Debug + PartialEq + 'a>( field_name: String, a: impl Iterator<Item = &'a T>, b: impl Iterator<Item = &'a T>, ) -> Self
pub fn retain_children<F>(&mut self, f: F)
pub fn equal(&self) -> bool
pub fn not_equal(&self) -> bool
Trait Implementations§
Source§impl Clone for Comparison
impl Clone for Comparison
Source§fn clone(&self) -> Comparison
fn clone(&self) -> Comparison
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Comparison
impl Debug for Comparison
Source§impl PartialEq for Comparison
impl PartialEq for Comparison
impl StructuralPartialEq for Comparison
Auto Trait Implementations§
impl Freeze for Comparison
impl RefUnwindSafe for Comparison
impl Send for Comparison
impl Sync for Comparison
impl Unpin for Comparison
impl UnwindSafe for Comparison
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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