Struct git_diff::visit::Changes[][src]

pub struct Changes<'a>(_);

Implementations

impl<'a> Changes<'a>[src]

pub fn needed_to_obtain<LocateFn, R>(
    self,
    other: TreeIter<'a>,
    state: &mut State<R::PathId>,
    locate: LocateFn,
    delegate: &mut R
) -> Result<(), Error> where
    LocateFn: for<'b> FnMut(&oid, &'b mut Vec<u8>) -> Option<TreeIter<'b>>,
    R: Record
[src]

Returns the changes that need to be applied to self to get other. TODO: Talk about choices in error handling and why Option is enough, as opposed to the usual Result<Option> Talk about progress (done via delegate if needed)

Notes

  • it does a breadth first iteration as buffer space only fits two trees, the current one on the one we compare with.
  • does not do rename tracking but attempts to reduce allocations to zero (so performance is mostly determined by the delegate implementation which should be as specific as possible.
  • cycle checking is not performed, but can be performed in the delegate
  • [ManuallyDrop] is used because Peekable is needed. When using it as wrapper around our no-drop iterators, all of the sudden borrowcheck complains as Drop is present (even though it’s not)

Trait Implementations

impl<'a, T> From<T> for Changes<'a> where
    T: Into<Option<TreeIter<'a>>>, 
[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Changes<'a>

impl<'a> Send for Changes<'a>

impl<'a> Sync for Changes<'a>

impl<'a> Unpin for Changes<'a>

impl<'a> UnwindSafe for Changes<'a>

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> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

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

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

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T> TryConv for T

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.