pub struct RaceVisualizer { /* private fields */ }
Expand description
Visualization renderer for the sorting race
Implementations§
Source§impl RaceVisualizer
impl RaceVisualizer
Sourcepub fn set_show_comparisons(&mut self, show: bool)
pub fn set_show_comparisons(&mut self, show: bool)
Set whether to show comparison highlights
Sourcepub fn set_show_metrics(&mut self, show: bool)
pub fn set_show_metrics(&mut self, show: bool)
Set whether to show metrics
Sourcepub fn set_color_enabled(&mut self, enabled: bool)
pub fn set_color_enabled(&mut self, enabled: bool)
Set whether colors are enabled
Sourcepub fn render(&self, algorithms: &[Box<dyn Sorter>]) -> String
pub fn render(&self, algorithms: &[Box<dyn Sorter>]) -> String
Render the current state of all algorithms
Sourcepub fn render_metrics(&self, algorithms: &[Box<dyn Sorter>]) -> String
pub fn render_metrics(&self, algorithms: &[Box<dyn Sorter>]) -> String
Render metrics summary
Sourcepub fn render_progress(&self, algorithms: &[Box<dyn Sorter>]) -> String
pub fn render_progress(&self, algorithms: &[Box<dyn Sorter>]) -> String
Render progress bars for all algorithms
Sourcepub fn create_frame(&self, title: &str, content: &str) -> String
pub fn create_frame(&self, title: &str, content: &str) -> String
Create a simple text-based visualization frame
Trait Implementations§
Source§impl Debug for RaceVisualizer
impl Debug for RaceVisualizer
Auto Trait Implementations§
impl Freeze for RaceVisualizer
impl RefUnwindSafe for RaceVisualizer
impl Send for RaceVisualizer
impl Sync for RaceVisualizer
impl Unpin for RaceVisualizer
impl UnwindSafe for RaceVisualizer
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> 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