[go: up one dir, main page]

Struct similar::algorithms::Compact[][src]

pub struct Compact<'old, 'new, Old: ?Sized, New: ?Sized, D> { /* fields omitted */ }

Performs semantic cleanup operations on a diff.

This merges similar ops together but also tries to move hunks up and down the diff with the desire to connect as many hunks as possible. It still needs to be combined with Replace to get actual replace diff ops out.

Implementations

impl<'old, 'new, Old: ?Sized, New: ?Sized, D> Compact<'old, 'new, Old, New, D> where
    D: DiffHook,
    Old: Index<usize> + 'old,
    New: Index<usize> + 'new,
    New::Output: PartialEq<Old::Output>, 
[src]

pub fn new(d: D, old: &'old Old, new: &'new New) -> Self[src]

Creates a new compact hook wrapping another hook.

pub fn into_inner(self) -> D[src]

Extracts the inner hook.

Trait Implementations

impl<'old, 'new, Old: ?Sized, New: ?Sized, D: DiffHook> AsMut<D> for Compact<'old, 'new, Old, New, D>[src]

impl<'old, 'new, Old: ?Sized, New: ?Sized, D: DiffHook> AsRef<D> for Compact<'old, 'new, Old, New, D>[src]

impl<'old, 'new, Old: Debug + ?Sized, New: Debug + ?Sized, D: Debug> Debug for Compact<'old, 'new, Old, New, D>[src]

impl<'old, 'new, Old: ?Sized, New: ?Sized, D> DiffHook for Compact<'old, 'new, Old, New, D> where
    D: DiffHook,
    Old: Index<usize> + 'old,
    New: Index<usize> + 'new,
    New::Output: PartialEq<Old::Output>, 
[src]

type Error = D::Error

The error produced from the hook methods.

Auto Trait Implementations

impl<'old, 'new, Old: ?Sized, New: ?Sized, D> RefUnwindSafe for Compact<'old, 'new, Old, New, D> where
    D: RefUnwindSafe,
    New: RefUnwindSafe,
    Old: RefUnwindSafe

impl<'old, 'new, Old: ?Sized, New: ?Sized, D> Send for Compact<'old, 'new, Old, New, D> where
    D: Send,
    New: Sync,
    Old: Sync

impl<'old, 'new, Old: ?Sized, New: ?Sized, D> Sync for Compact<'old, 'new, Old, New, D> where
    D: Sync,
    New: Sync,
    Old: Sync

impl<'old, 'new, Old: ?Sized, New: ?Sized, D> Unpin for Compact<'old, 'new, Old, New, D> where
    D: Unpin

impl<'old, 'new, Old: ?Sized, New: ?Sized, D> UnwindSafe for Compact<'old, 'new, Old, New, D> where
    D: UnwindSafe,
    New: RefUnwindSafe,
    Old: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.