Struct similar::algorithms::Capture [−][src]
A DiffHook
that captures all diff operations.
Implementations
impl Capture
[src]
pub fn new() -> Capture
[src]
Creates a new capture hook.
pub fn into_ops(self) -> Vec<DiffOp>
[src]
Converts the capture hook into a vector of ops.
pub fn into_grouped_ops(self, n: usize) -> Vec<Vec<DiffOp>>
[src]
Isolate change clusters by eliminating ranges with no changes.
This is equivalent to calling group_diff_ops
on Capture::into_ops
.
pub fn ops(&self) -> &[DiffOp]
[src]
Accesses the captured operations.
Trait Implementations
impl Clone for Capture
[src]
impl Default for Capture
[src]
impl DiffHook for Capture
[src]
type Error = Infallible
fn equal(
&mut self,
old_index: usize,
new_index: usize,
len: usize
) -> Result<(), Self::Error>
[src]
&mut self,
old_index: usize,
new_index: usize,
len: usize
) -> Result<(), Self::Error>
fn delete(
&mut self,
old_index: usize,
old_len: usize,
new_index: usize
) -> Result<(), Self::Error>
[src]
&mut self,
old_index: usize,
old_len: usize,
new_index: usize
) -> Result<(), Self::Error>
fn insert(
&mut self,
old_index: usize,
new_index: usize,
new_len: usize
) -> Result<(), Self::Error>
[src]
&mut self,
old_index: usize,
new_index: usize,
new_len: usize
) -> Result<(), Self::Error>
fn replace(
&mut self,
old_index: usize,
old_len: usize,
new_index: usize,
new_len: usize
) -> Result<(), Self::Error>
[src]
&mut self,
old_index: usize,
old_len: usize,
new_index: usize,
new_len: usize
) -> Result<(), Self::Error>
fn finish(&mut self) -> Result<(), Self::Error>
[src]
Auto Trait Implementations
impl RefUnwindSafe for Capture
[src]
impl Send for Capture
[src]
impl Sync for Capture
[src]
impl Unpin for Capture
[src]
impl UnwindSafe for Capture
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,