pub struct PatchFormatter { /* private fields */ }
Expand description
Struct used to adjust the formatting of a Patch
Implementations§
source§impl PatchFormatter
impl PatchFormatter
sourcepub fn with_color(self) -> Self
pub fn with_color(self) -> Self
Enable formatting a patch with color
sourcepub fn fmt_patch<'a>(&'a self, patch: &'a Patch<'a, str>) -> impl Display + 'a
pub fn fmt_patch<'a>(&'a self, patch: &'a Patch<'a, str>) -> impl Display + 'a
Returns a Display
impl which can be used to print a Patch
pub fn write_patch_into<T: ToOwned + AsRef<[u8]> + ?Sized, W: Write>( &self, patch: &Patch<'_, T>, w: W, ) -> Result<()>
Trait Implementations§
source§impl Debug for PatchFormatter
impl Debug for PatchFormatter
Auto Trait Implementations§
impl Freeze for PatchFormatter
impl RefUnwindSafe for PatchFormatter
impl Send for PatchFormatter
impl Sync for PatchFormatter
impl Unpin for PatchFormatter
impl UnwindSafe for PatchFormatter
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