pub struct DiffRenderOptimizer {
pub max_lines_per_render: usize,
pub enable_syntax_highlighting: bool,
}Expand description
Diff rendering optimizer for large files
Fields§
§max_lines_per_render: usizeMaximum lines to render at once
enable_syntax_highlighting: boolWhether to use syntax highlighting (can be expensive)
Implementations§
Source§impl DiffRenderOptimizer
impl DiffRenderOptimizer
Sourcepub fn is_large_diff(&self, total_lines: usize) -> bool
pub fn is_large_diff(&self, total_lines: usize) -> bool
Check if a diff is too large for full rendering
Sourcepub fn recommended_chunk_size(&self, total_lines: usize) -> usize
pub fn recommended_chunk_size(&self, total_lines: usize) -> usize
Get the recommended chunk size for rendering
Sourcepub fn should_disable_syntax_highlighting(&self, total_lines: usize) -> bool
pub fn should_disable_syntax_highlighting(&self, total_lines: usize) -> bool
Disable syntax highlighting for very large diffs
Trait Implementations§
Source§impl Clone for DiffRenderOptimizer
impl Clone for DiffRenderOptimizer
Source§fn clone(&self) -> DiffRenderOptimizer
fn clone(&self) -> DiffRenderOptimizer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DiffRenderOptimizer
impl Debug for DiffRenderOptimizer
Auto Trait Implementations§
impl Freeze for DiffRenderOptimizer
impl RefUnwindSafe for DiffRenderOptimizer
impl Send for DiffRenderOptimizer
impl Sync for DiffRenderOptimizer
impl Unpin for DiffRenderOptimizer
impl UnwindSafe for DiffRenderOptimizer
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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