pub struct Patch<T>(_);
Implementations§
source§impl<T> Patch<T>where
T: Clone + Copy + Ord + Sub<T, Output = T> + Add<T, Output = T> + 'static + AddAssign<T> + Default + PartialEq<T>,
impl<T> Patch<T>where T: Clone + Copy + Ord + Sub<T, Output = T> + Add<T, Output = T> + 'static + AddAssign<T> + Default + PartialEq<T>,
pub fn new(edits: Vec<Edit<T>, Global>) -> Patch<T>
pub fn edits(&self) -> &[Edit<T>]
pub fn into_inner(self) -> Vec<Edit<T>, Global>
pub fn compose( &self, new_edits_iter: impl IntoIterator<Item = Edit<T>> ) -> Patch<T>
pub fn invert(&mut self) -> &mut Patch<T>
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> IntoIterator for &'a Patch<T>where
T: Clone,
impl<'a, T> IntoIterator for &'a Patch<T>where T: Clone,
source§impl<'a, T> IntoIterator for &'a mut Patch<T>where
T: Clone,
impl<'a, T> IntoIterator for &'a mut Patch<T>where T: Clone,
source§impl<T> IntoIterator for Patch<T>where
T: Clone,
impl<T> IntoIterator for Patch<T>where T: Clone,
source§impl<T> PartialEq<Patch<T>> for Patch<T>where
T: PartialEq<T>,
impl<T> PartialEq<Patch<T>> for Patch<T>where T: PartialEq<T>,
impl<T> Eq for Patch<T>where T: Eq,
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.