pub struct DataAnalyzer { /* private fields */ }
Expand description
Analyzes data for statistics, column widths, and other metrics
Extracted from the monolithic enhanced_tui.rs
Implementations§
Source§impl DataAnalyzer
impl DataAnalyzer
pub fn new() -> Self
Sourcepub fn calculate_column_statistics(
&mut self,
column_name: &str,
values: &[&str],
) -> ColumnStatistics
pub fn calculate_column_statistics( &mut self, column_name: &str, values: &[&str], ) -> ColumnStatistics
Calculate statistics for a specific column
Sourcepub fn detect_column_type(&self, values: &[&str]) -> ColumnType
pub fn detect_column_type(&self, values: &[&str]) -> ColumnType
Detect the type of a column based on its values
Sourcepub fn calculate_optimal_column_widths(
&mut self,
data: &[Value],
max_sample_rows: usize,
) -> Vec<usize>
pub fn calculate_optimal_column_widths( &mut self, data: &[Value], max_sample_rows: usize, ) -> Vec<usize>
Calculate optimal column widths for display
Sourcepub fn get_column_statistics(
&self,
column_name: &str,
) -> Option<&ColumnStatistics>
pub fn get_column_statistics( &self, column_name: &str, ) -> Option<&ColumnStatistics>
Get cached column statistics
Sourcepub fn get_column_widths(&self) -> &[usize]
pub fn get_column_widths(&self) -> &[usize]
Get cached column widths
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear all cached data
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DataAnalyzer
impl RefUnwindSafe for DataAnalyzer
impl Send for DataAnalyzer
impl Sync for DataAnalyzer
impl Unpin for DataAnalyzer
impl UnwindSafe for DataAnalyzer
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> 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