pub struct StringRenderer { /* private fields */ }Expand description
A renderer that manages string-based terminal output with line diffing
Implementations§
Source§impl StringRenderer
impl StringRenderer
Sourcepub fn with_output(output: Box<dyn Write + Send>) -> Self
pub fn with_output(output: Box<dyn Write + Send>) -> Self
Create a new string renderer with custom output
Sourcepub fn render(&mut self, content: String) -> Result<()>
pub fn render(&mut self, content: String) -> Result<()>
Render content to the terminal with optimized performance
Sourcepub fn stats(&self) -> RenderStats
pub fn stats(&self) -> RenderStats
Get rendering statistics for performance monitoring
Sourcepub fn reserve_capacity(&mut self, content_size: usize)
pub fn reserve_capacity(&mut self, content_size: usize)
Pre-warm the renderer with expected content size
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StringRenderer
impl !RefUnwindSafe for StringRenderer
impl Send for StringRenderer
impl !Sync for StringRenderer
impl Unpin for StringRenderer
impl !UnwindSafe for StringRenderer
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> Inspectable for T
impl<T> Inspectable for T
Source§fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
fn inspect_if(self, condition: bool, label: &str) -> Selfwhere
Self: Debug,
Conditionally inspect this value
Source§fn inspect_with<F>(self, label: &str, f: F) -> Self
fn inspect_with<F>(self, label: &str, f: F) -> Self
Inspect with a custom formatter