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