pub struct Patch<T>(_);
Implementations§
source§impl<T> Patch<T>where
T: 'static + Clone + Copy + Ord + Sub<T, Output = T> + Add<T, Output = T> + AddAssign + Default + PartialEq,
impl<T> Patch<T>where T: 'static + Clone + Copy + Ord + Sub<T, Output = T> + Add<T, Output = T> + AddAssign + Default + PartialEq,
pub fn new(edits: Vec<Edit<T>>) -> Self
pub fn edits(&self) -> &[Edit<T>]
pub fn into_inner(self) -> Vec<Edit<T>>
pub fn compose(&self, new_edits_iter: impl IntoIterator<Item = Edit<T>>) -> Self
pub fn invert(&mut self) -> &mut Self
pub fn clear(&mut self)
pub fn is_empty(&self) -> bool
pub fn push(&mut self, edit: Edit<T>)
pub fn old_to_new(&self, old: T) -> T
Trait Implementations§
source§impl<'a, T: Clone> IntoIterator for &'a Patch<T>
impl<'a, T: Clone> IntoIterator for &'a Patch<T>
source§impl<'a, T: Clone> IntoIterator for &'a mut Patch<T>
impl<'a, T: Clone> IntoIterator for &'a mut Patch<T>
source§impl<T: Clone> IntoIterator for Patch<T>
impl<T: Clone> IntoIterator for Patch<T>
source§impl<T: PartialEq> PartialEq<Patch<T>> for Patch<T>
impl<T: PartialEq> PartialEq<Patch<T>> for Patch<T>
impl<T: Eq> Eq for Patch<T>
impl<T> StructuralEq for Patch<T>
impl<T> StructuralPartialEq for Patch<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Patch<T>where T: RefUnwindSafe,
impl<T> Send for Patch<T>where T: Send,
impl<T> Sync for Patch<T>where T: Sync,
impl<T> Unpin for Patch<T>where T: Unpin,
impl<T> UnwindSafe for Patch<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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.