PatchOnlyDiff

Enum PatchOnlyDiff 

Source
pub enum PatchOnlyDiff<Patch> {
    Unchanged,
    Patched(Patch),
}
Expand description

A generic type which can represent two possible ‘diff’ states. Appropriate for types which cannot be fully replaced - this only really makes sense in the context of a derived ‘diff’ that has skipped fields

Variants§

§

Unchanged

§

Patched(Patch)

Trait Implementations§

Source§

impl<P> Apply for PatchOnlyDiff<P>
where P: Apply,

Source§

type Parent = <P as Apply>::Parent

Source§

fn apply_to_base(&self, source: &mut Self::Parent, errs: &mut Vec<ApplyError>)

Source§

impl<Patch: Clone> Clone for PatchOnlyDiff<Patch>

Source§

fn clone(&self) -> PatchOnlyDiff<Patch>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Patch: Debug> Debug for PatchOnlyDiff<Patch>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Patch: PartialEq> PartialEq for PatchOnlyDiff<Patch>

Source§

fn eq(&self, other: &PatchOnlyDiff<Patch>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<P> Replace for PatchOnlyDiff<P>

Source§

impl<Patch> StructuralPartialEq for PatchOnlyDiff<Patch>

Auto Trait Implementations§

§

impl<Patch> Freeze for PatchOnlyDiff<Patch>
where Patch: Freeze,

§

impl<Patch> RefUnwindSafe for PatchOnlyDiff<Patch>
where Patch: RefUnwindSafe,

§

impl<Patch> Send for PatchOnlyDiff<Patch>
where Patch: Send,

§

impl<Patch> Sync for PatchOnlyDiff<Patch>
where Patch: Sync,

§

impl<Patch> Unpin for PatchOnlyDiff<Patch>
where Patch: Unpin,

§

impl<Patch> UnwindSafe for PatchOnlyDiff<Patch>
where Patch: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.