[][src]Trait visit_diff::SeqDiffer

pub trait SeqDiffer {
    type Ok;
    type Err;
    fn diff_element<T: ?Sized>(&mut self, a: &T, b: &T)
    where
        T: Diff
;
fn left_excess<T: ?Sized>(&mut self, a: &T)
    where
        T: Diff
;
fn right_excess<T: ?Sized>(&mut self, b: &T)
    where
        T: Diff
;
fn end(self) -> Result<Self::Ok, Self::Err>; fn diff_elements<T, I>(&mut self, a: I, b: I)
    where
        T: Diff,
        I: IntoIterator<Item = T>
, { ... } }

A type that can do something with information about differences in a sequence, like a slice or Vec.

Associated Types

type Ok

Type returned on success.

type Err

Type returned on failure.

Loading content...

Required methods

fn diff_element<T: ?Sized>(&mut self, a: &T, b: &T) where
    T: Diff

We've found elements in corresponding positions in both sequences.

fn left_excess<T: ?Sized>(&mut self, a: &T) where
    T: Diff

We've found an element that only appears in the left-hand sequence.

fn right_excess<T: ?Sized>(&mut self, b: &T) where
    T: Diff

We've found an element that only appears in the right-hand sequence.

fn end(self) -> Result<Self::Ok, Self::Err>

Complete the sequence and produce the result.

Loading content...

Provided methods

fn diff_elements<T, I>(&mut self, a: I, b: 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.

Loading content...

Implementations on Foreign Types

impl SeqDiffer for ()[src]

type Ok = ()

type Err = Void

Loading content...

Implementors

impl<R> SeqDiffer for Const<R>[src]

type Ok = R

type Err = Void

Loading content...