pub struct YamlRenderer { /* private fields */ }Expand description
Renders a DiffTree as YAML-like diff output.
Output uses unified diff conventions:
prefix for context lines (unchanged values, comments, structural markers)-prefix for expected (what we wanted but didn’t get)+prefix for actual (what we got instead)
Implementations§
Source§impl YamlRenderer
impl YamlRenderer
Sourcepub const DEFAULT_MAX_LINES_PER_SIDE: u32 = 20
pub const DEFAULT_MAX_LINES_PER_SIDE: u32 = 20
Default maximum lines to render per side.
Sourcepub const DEFAULT_INDENT_WIDTH: u16 = 2
pub const DEFAULT_INDENT_WIDTH: u16 = 2
Default number of spaces per indentation level.
Sourcepub fn with_max_lines_per_side(self, max: Option<u32>) -> Self
pub fn with_max_lines_per_side(self, max: Option<u32>) -> Self
Sets the maximum lines to render per side.
Sourcepub fn with_indent_width(self, width: u16) -> Self
pub fn with_indent_width(self, width: u16) -> Self
Sets the number of spaces per indentation level.
Trait Implementations§
Source§impl Default for YamlRenderer
impl Default for YamlRenderer
Source§impl DiffRenderer for YamlRenderer
impl DiffRenderer for YamlRenderer
Auto Trait Implementations§
impl Freeze for YamlRenderer
impl RefUnwindSafe for YamlRenderer
impl Send for YamlRenderer
impl Sync for YamlRenderer
impl Unpin for YamlRenderer
impl UnsafeUnpin for YamlRenderer
impl UnwindSafe for YamlRenderer
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