pub enum DocumentType<T: Debug + PartialEq + Serialize + Clone> {
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> AsMut<T> for DocumentType<T>
impl<T> AsMut<T> for DocumentType<T>
Source§impl<T> AsRef<T> for DocumentType<T>
impl<T> AsRef<T> for DocumentType<T>
Source§impl<T: Clone + Debug + PartialEq + Serialize + Clone> Clone for DocumentType<T>
impl<T: Clone + Debug + PartialEq + Serialize + Clone> Clone for DocumentType<T>
Source§fn clone(&self) -> DocumentType<T>
fn clone(&self) -> DocumentType<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T> Serialize for DocumentType<T>
impl<T> Serialize for DocumentType<T>
impl<T: Eq + Debug + PartialEq + Serialize + Clone> Eq for DocumentType<T>
impl<T: Debug + PartialEq + Serialize + Clone> StructuralPartialEq for DocumentType<T>
Auto Trait Implementations§
impl<T> Freeze for DocumentType<T>where
T: Freeze,
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