Enum common_types::account_diff::Diff[][src]

pub enum Diff<T> {
    Same,
    Born(T),
    Changed(T, T),
    Died(T),
}

Diff type for specifying a change (or not).

Variants

Both sides are the same.

Left (pre, source) side doesn't include value, right side (post, destination) does.

Both sides include data; it chaged value between them.

Left (pre, source) side does include value, right side (post, destination) does not.

Methods

impl<T> Diff<T>
[src]

Construct new object with given pre and post.

Get the before value, if there is one.

Get the after value, if there is one.

Determine whether there was a change or not.

Trait Implementations

impl<T: Debug> Debug for Diff<T>
[src]

Formats the value using the given formatter. Read more

impl<T: PartialEq> PartialEq for Diff<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Eq> Eq for Diff<T>
[src]

impl<T: Clone> Clone for Diff<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T> Send for Diff<T> where
    T: Send

impl<T> Sync for Diff<T> where
    T: Sync