pub struct Platform<'a> {
pub resource_cache: &'a mut Platform,
}Available on crate feature
blob-diff only.Expand description
A platform to keep temporary information to perform line diffs on modified blobs.
Fields§
§resource_cache: &'a mut PlatformThe cache holding diffable data related to our blobs.
Implementations§
Source§impl Platform<'_>
impl Platform<'_>
Sourcepub fn lines<FnH, E>(
&mut self,
process_hunk: FnH,
) -> Result<Outcome<'_>, Error<E>>
pub fn lines<FnH, E>( &mut self, process_hunk: FnH, ) -> Result<Outcome<'_>, Error<E>>
Perform a diff on lines between the old and the new version of a blob, passing each hunk of lines to process_hunk.
The diffing algorithm is determined by the diff.algorithm configuration, or individual diff drivers.
Note that process_hunk is not called if one of the involved resources are binary, but that can be determined
by introspecting the outcome.
Auto Trait Implementations§
impl<'a> Freeze for Platform<'a>
impl<'a> RefUnwindSafe for Platform<'a>
impl<'a> Send for Platform<'a>
impl<'a> Sync for Platform<'a>
impl<'a> Unpin for Platform<'a>
impl<'a> !UnwindSafe for Platform<'a>
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