Enum libdiffsitter::diff::DocumentType
source · pub enum DocumentType<T: Debug + Clone + PartialEq + Serialize> {
Old(T),
New(T),
}
Expand description
A generic type for diffs that source from one of two documents.
A lot of items in the diff are delineated by whether they come from the old document or the new one. This enum generically defines an enum wrapper over those document types.
Variants§
Trait Implementations§
source§impl<T: Clone + Debug + Clone + PartialEq + Serialize> Clone for DocumentType<T>
impl<T: Clone + Debug + Clone + PartialEq + Serialize> Clone for DocumentType<T>
source§fn clone(&self) -> DocumentType<T>
fn clone(&self) -> DocumentType<T>
Returns a copy 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<T: PartialEq + Debug + Clone + PartialEq + Serialize> PartialEq<DocumentType<T>> for DocumentType<T>
impl<T: PartialEq + Debug + Clone + PartialEq + Serialize> PartialEq<DocumentType<T>> for DocumentType<T>
source§fn eq(&self, other: &DocumentType<T>) -> bool
fn eq(&self, other: &DocumentType<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T> Serialize for DocumentType<T>where
T: Serialize + Debug + Clone + PartialEq + Serialize,
impl<T> Serialize for DocumentType<T>where T: Serialize + Debug + Clone + PartialEq + Serialize,
impl<T: Eq + Debug + Clone + PartialEq + Serialize> Eq for DocumentType<T>
impl<T: Debug + Clone + PartialEq + Serialize> StructuralEq for DocumentType<T>
impl<T: Debug + Clone + PartialEq + Serialize> StructuralPartialEq for DocumentType<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for DocumentType<T>where T: RefUnwindSafe,
impl<T> Send for DocumentType<T>where T: Send,
impl<T> Sync for DocumentType<T>where T: Sync,
impl<T> Unpin for DocumentType<T>where T: Unpin,
impl<T> UnwindSafe for DocumentType<T>where T: UnwindSafe,
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