[][src]Trait visit_diff::StructDiffer

pub trait StructDiffer {
    type Ok;
    type Err;
    fn diff_field<T: ?Sized>(&mut self, name: &'static str, a: &T, b: &T)
    where
        T: Diff
;
fn end(self) -> Result<Self::Ok, Self::Err>; fn skip_field<T: ?Sized>(&mut self, _name: &'static str) { ... } }

A type that can deal with differences in a struct.

Associated Types

type Ok

Type returned on success.

type Err

Type returned on failure.

Loading content...

Required methods

fn diff_field<T: ?Sized>(&mut self, name: &'static str, a: &T, b: &T) where
    T: Diff

Visits a field name with values a and b in the respective structures.

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

Completes traversal of the struct.

Loading content...

Provided methods

fn skip_field<T: ?Sized>(&mut self, _name: &'static str)

Skips a field that is excluded from differencing.

Some differs may e.g. print a placeholder for skipped fields.

Loading content...

Implementations on Foreign Types

impl StructDiffer for ()[src]

type Ok = ()

type Err = Void

fn skip_field<T: ?Sized>(&mut self, _name: &'static str)[src]

Loading content...

Implementors

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

type Ok = R

type Err = Void

fn skip_field<T: ?Sized>(&mut self, _name: &'static str)[src]

Loading content...