pub struct DiffExporter { /* private fields */ }Expand description
Handles exporting diffs to various formats and destinations
Implementations§
Source§impl DiffExporter
impl DiffExporter
pub fn new(config: ExportConfig) -> Self
pub fn with_format(format: DiffFormat) -> Self
Sourcepub fn export_diff<P: AsRef<Path>>(
&self,
result: &DiffResult,
old_path: &Path,
new_path: &Path,
output_path: P,
) -> Result<()>
pub fn export_diff<P: AsRef<Path>>( &self, result: &DiffResult, old_path: &Path, new_path: &Path, output_path: P, ) -> Result<()>
Export a single diff result to a file
Sourcepub fn export_multifile_patch<P: AsRef<Path>>(
&self,
events: &[FileEvent],
output_path: P,
) -> Result<()>
pub fn export_multifile_patch<P: AsRef<Path>>( &self, events: &[FileEvent], output_path: P, ) -> Result<()>
Export multiple file events as a single patch
Sourcepub fn export_diff_to_writer<W: Write>(
&self,
result: &DiffResult,
old_path: &Path,
new_path: &Path,
writer: &mut W,
) -> Result<()>
pub fn export_diff_to_writer<W: Write>( &self, result: &DiffResult, old_path: &Path, new_path: &Path, writer: &mut W, ) -> Result<()>
Export to a writer (for streaming or custom outputs)
Source§impl DiffExporter
Predefined export presets
impl DiffExporter
Predefined export presets
Auto Trait Implementations§
impl Freeze for DiffExporter
impl RefUnwindSafe for DiffExporter
impl Send for DiffExporter
impl Sync for DiffExporter
impl Unpin for DiffExporter
impl UnwindSafe for DiffExporter
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more