Skip to main content

AnalysisModal

Struct AnalysisModal 

Source
pub struct AnalysisModal {
Show 29 fields pub scroll_position: usize, pub selected_column: Option<usize>, pub describe_columns: ColumnScroll, pub distribution_columns: ColumnScroll, pub correlation_columns: ColumnScroll, pub sample: Sample, pub sample_dataset: Option<u64>, pub sample_run_for: Option<u64>, pub sample_form: Option<SampleForm>, pub own_sample: Option<Sample>, pub table_state: TableState, pub distribution_table_state: TableState, pub correlation_table_state: TableState, pub sidebar_state: TableState, pub describe_results: Option<AnalysisResults>, pub distribution_results: Option<AnalysisResults>, pub correlation_results: Option<AnalysisResults>, pub computing: Option<AnalysisProgress>, pub view: AnalysisView, pub focus: AnalysisFocus, pub selected_tool: Option<AnalysisTool>, pub selected_distribution: Option<usize>, pub selected_correlation: Option<(usize, usize)>, pub correlation_method: CorrelationMethod, pub selected_theoretical_distribution: DistributionType, pub distribution_selector_state: TableState, pub histogram_scale: HistogramScale, pub quality: QualityState, pub results_view: Option<u64>, /* private fields */
}

Fields§

§scroll_position: usize§selected_column: Option<usize>§describe_columns: ColumnScroll§distribution_columns: ColumnScroll§correlation_columns: ColumnScroll

Kept on the selected cell by the matrix as it draws.

§sample: Sample

The rows every tool reads (one scope, method, size and seed), so tools compare like with like. Kept across opens; s edits it.

§sample_dataset: Option<u64>

The dataset the sample’s scope was chosen for: a partition or file scope means nothing on another.

§sample_run_for: Option<u64>

The dataset a sample last ran on; after that, a tool with no result runs at once instead of asking with the Sample form.

§sample_form: Option<SampleForm>

The Sample form, while it is open.

§own_sample: Option<Sample>

The tools’ own sample, set aside while the view has its own sample, which every tool then reads whole.

§table_state: TableState§distribution_table_state: TableState§correlation_table_state: TableState§sidebar_state: TableState§describe_results: Option<AnalysisResults>

Cached results per tool; each tool computes and stores its own state independently.

§distribution_results: Option<AnalysisResults>§correlation_results: Option<AnalysisResults>§computing: Option<AnalysisProgress>

Set while a tool runs: its phase and progress, drawn in place of results.

§view: AnalysisView§focus: AnalysisFocus§selected_tool: Option<AnalysisTool>

None = no tool selected yet (show instructions); Some(tool) = user chose a tool (may be computing or showing results).

§selected_distribution: Option<usize>§selected_correlation: Option<(usize, usize)>§correlation_method: CorrelationMethod

The coefficient the matrix and the pair detail show; both are computed.

§selected_theoretical_distribution: DistributionType§distribution_selector_state: TableState§histogram_scale: HistogramScale§quality: QualityState

Data Quality: its plan, its report and where the cursor is in each.

§results_view: Option<u64>

The view (DataTableState::len_generation) the results are of.

Implementations§

Source§

impl AnalysisModal

Source

pub fn with_sample_rows(rows: usize) -> Self

A modal whose shared sample starts at the configured size: [performance] analysis_sample_rows, where 0 means every row.

Source

pub fn open(&mut self, view: Option<u64>)

Open the screen on view: a close’s results on this view come back as they were; on any other view every tool starts empty.

Source

pub fn close(&mut self)

Close the screen, keeping the results for the next open on the same view.

Source

pub fn current_results(&self) -> Option<&AnalysisResults>

Returns the cached results for the currently selected tool, if any.

Source

pub fn switch_focus(&mut self)

Tab on the main view: the tool list and the result trade focus. Not offered on detail views (one focusable thing) or before a tool is chosen.

Source

pub fn highlighted_tool(&self) -> Option<AnalysisTool>

The tool under the sidebar cursor.

Source

pub fn select_tool(&mut self)

Select the tool under the sidebar cursor; the caller places the cursor.

Source

pub fn next_tool(&mut self)

Source

pub fn previous_tool(&mut self)

Source

pub fn open_distribution_detail(&mut self)

Source

pub fn open_correlation_detail(&mut self)

Source

pub fn close_detail(&mut self)

Source

pub fn scroll_left(&mut self)

Source

pub fn scroll_right(&mut self)

Source

pub fn column_scroll(&self) -> Option<&ColumnScroll>

The selected tool’s statistic scroll, for the tools that scroll by statistic.

Source

pub fn follow_view_sample(&mut self, sampled: bool)

Read the view’s sample whole while it has one (sampled), and the tools’ own sample again once it has none.

Source

pub fn quality_row_count(&self) -> usize

Source

pub fn quality_selected_is_clean(&self) -> bool

Whether the highlighted Overview entry is the clean-columns entry, which opens no rows and instead lists the checks.

Source

pub fn selected_finding(&self) -> Option<(&QualityReport, Finding)>

The report on screen and the finding under the cursor, as Overview lists them: narrowed and ordered.

Source

pub fn open_findings_picker(&mut self, by_column: bool)

Narrow the findings to a column (by_column) or a check, from a list of those the report has, the current one selected.

Source

pub fn cycle_findings_order(&mut self)

The next order for the findings, keeping the finding under the cursor under it.

Source

pub fn clear_findings_narrowing(&mut self)

Show every finding again, in the order chosen.

Source

pub fn sample_key_opens_form(&self) -> bool

Whether s opens the Sample form: on a tool’s main view with nothing else holding keys (run, popup, editor, text field).

Source

pub fn export_typing(&self) -> bool

Whether the export dialog’s path owns typed characters.

Source

pub fn intent_typing(&self) -> bool

Whether a Column intent field owns typed characters, so Ctrl-C and ? type.

Source

pub fn sample_scope_typing(&self) -> bool

Whether the Sample form’s scope field owns typed characters, so Ctrl-C and ? type.

Source

pub fn quality_expected_typing(&self) -> bool

Whether the Expected editor’s From or Before has the cursor, so all but its own keys type.

Source

pub fn open_trend_detail(&mut self)

Open the bars of the Trends line under the cursor, the first bar selected.

Source

pub fn cycle_trend_detail_metric(&mut self)

The next measure in a bar’s detail, on the same column’s line. A column with nothing to draw in it has no line, and Trends lists what does.

Back to Trends from a bar detail or the gaps, the line still selected.

Source

pub fn set_quality_page(&mut self, page: QualityPage)

Source

pub fn set_quality_column_page(&mut self, page: QualityPage)

Move between the column lens and its detail, keeping the selected column.

Source

pub fn open_segment_detail(&mut self)

Open the highlighted segment’s columns, or go back to the list with the segment still selected.

Source

pub fn close_segment_detail(&mut self)

Source

pub fn segment_order(&self) -> Vec<usize>

The order Segments lists its rows in.

Source

pub fn selected_segment(&self) -> Option<usize>

The segment under the cursor on Segments, whichever order it is listed in.

Source

pub fn toggle_segment_order(&mut self)

List segments in their own order or clearest change first, keeping the one under the cursor under it.

Source

pub fn open_interval_detail(&mut self)

Open the highlighted interval’s detail, its first count under the cursor.

Source

pub fn close_interval_detail(&mut self)

Back to the list, the interval still selected.

Source

pub fn interval_facts(&self) -> Vec<IntervalFact>

The counts an interval’s detail lists, each with rows it can open: those the interval measured, in the order the detail shows them.

Source

pub fn selected_interval_fact(&self) -> Option<IntervalFact>

The count under the cursor in an interval’s detail.

Source

pub fn interval_evidence( &self, schema: Option<&Schema>, ) -> Option<(Expr, String, usize)>

The rows behind the selected count in an interval’s detail, when its values identify them: a predicate over the run’s rows, with a label. schema (where known) lets a partition segment compare in its column’s type.

Source

pub fn scroll_quality_detail(&mut self, rows: i32)

Move the finding popup by rows, within what it last drew.

Source

pub fn show_quality_tab(&mut self, page: QualityPage)

Show a tab, keeping the column in view across Columns, Segments and Trends.

Source

pub fn step_quality_tab(&mut self, forward: bool)

The next or previous tab, stopping at either end.

Source

pub fn cycle_quality_metric(&mut self)

Source

pub fn quality_result_plan(&self) -> &DataQualityPlan

The plan the on-screen result was measured with (the plan until a run exists), so a draft never relabels what was measured.

Source

pub fn quality_plan_pending(&self) -> bool

The plan differs from the one the result on screen was measured with.

Source

pub fn setup_row(&self) -> SetupRow

The Setup row under the cursor.

Source

pub fn setup_edited(&self) -> bool

Whether Setup holds staged changes Esc would discard.

Source

pub fn plan_choices( &self, row: SetupRow, context: &PlanContext, ) -> Vec<(String, PlanChoice)>

The choices a Setup row offers, in the words the header uses.

Source

pub fn open_plan_picker(&mut self, row: SetupRow, context: &PlanContext)

Open the focused Setup row’s choices, the current one selected.

Source

pub fn open_format_picker(&mut self, column: &str, examples: &[String])

How column can be read as time: each format with how many of the on-screen examples it reads, best first, and reading as text again when it has a format.

Source

pub fn choose_plan_picker(&mut self) -> Option<String>

Take the picker’s selection into the plan and close it. Returns a text column chosen to read as time: its format is the next choice.

Source

pub fn cycle_setup_choice( &mut self, row: SetupRow, context: &PlanContext, forward: bool, )

The next or previous choice of a Setup row whose choices are a short list, in place: ←→ on Grain, Compare, Values, Latency and Window by.

Source

pub fn cycle_quality_time_role( &mut self, role_index: usize, columns: &[String], forward: bool, )

Source

pub fn move_row(&mut self, step: ListMove, rows: usize)

Move the focused tool’s cursor by step in rows rows, ten to a page. The correlation matrix moves its row, keeping its column; Home and End take the first and last off-diagonal pair.

Source

pub fn install_correlations(&mut self, results: AnalysisResults)

Install the matrix a run read. The cursor stays if still a cell, else starts on the first off-diagonal pair, where Enter opens a detail.

Source

pub fn correlation_size(&self) -> usize

The number of columns in the correlation matrix on screen.

Source

pub fn distribution_choices(&self) -> usize

The families the distribution detail’s selector lists for the column under the cursor.

Source

pub fn move_correlation_cell(&mut self, (rows, cols): (isize, isize))

Move the correlation cursor by (rows, columns), stopping at edges; the matrix scrolls to keep it in view as it draws.

Source

pub fn next_distribution(&mut self)

Source

pub fn previous_distribution(&mut self)

Source

pub fn select_distribution(&mut self)

Trait Implementations§

Source§

impl Default for AnalysisModal

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

impl<T> PlanCallbackArgs for T

Source§

impl<T> PlanCallbackOut for T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more