pub struct ReplSession {
pub config: DisplayConfig,
/* private fields */
}Expand description
Stateful REPL session (ALIM-REPL-001)
Prevents reload waste by keeping datasets in memory. Maintains quality cache for instant Andon display.
Fields§
§config: DisplayConfigDisplay configuration
Implementations§
Source§impl ReplSession
impl ReplSession
Sourcepub fn load_dataset(&mut self, name: &str, dataset: ArrowDataset)
pub fn load_dataset(&mut self, name: &str, dataset: ArrowDataset)
Load a dataset into the session
The dataset becomes the active dataset and quality is computed.
Sourcepub fn use_dataset(&mut self, name: &str) -> Result<()>
pub fn use_dataset(&mut self, name: &str) -> Result<()>
Sourcepub fn active_dataset(&self) -> Option<&Arc<ArrowDataset>>
pub fn active_dataset(&self) -> Option<&Arc<ArrowDataset>>
Get the currently active dataset
Sourcepub fn active_name(&self) -> Option<String>
pub fn active_name(&self) -> Option<String>
Get the name of the active dataset
Sourcepub fn active_grade(&self) -> Option<LetterGrade>
pub fn active_grade(&self) -> Option<LetterGrade>
Get the quality grade for the active dataset
Sourcepub fn active_row_count(&self) -> Option<usize>
pub fn active_row_count(&self) -> Option<usize>
Get the row count of the active dataset
Sourcepub fn add_history(&mut self, command: &str)
pub fn add_history(&mut self, command: &str)
Add a command to history
Sourcepub fn quality_cache(&self) -> Option<&QualityCache>
pub fn quality_cache(&self) -> Option<&QualityCache>
Get the quality cache
Sourcepub fn export_history(&self) -> String
pub fn export_history(&self) -> String
Export history as a reproducible shell script (ALIM-REPL-006)
Sourcepub fn column_names(&self) -> Vec<String>
pub fn column_names(&self) -> Vec<String>
Get schema column names for autocomplete
Trait Implementations§
Source§impl Debug for ReplSession
impl Debug for ReplSession
Auto Trait Implementations§
impl Freeze for ReplSession
impl !RefUnwindSafe for ReplSession
impl Send for ReplSession
impl Sync for ReplSession
impl Unpin for ReplSession
impl UnsafeUnpin for ReplSession
impl !UnwindSafe for ReplSession
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 moreCreates a shared type from an unshared type.