struct ShellState {
expand: bool,
paging_enabled: bool,
is_tty: bool,
debug: bool,
capture_file: Option<File>,
capture_path: Option<PathBuf>,
schema_cache: Option<Arc<RwLock<SchemaCache>>>,
shared_keyspace: Option<Arc<RwLock<Option<String>>>>,
colorizer: CqlColorizer,
}Expand description
Mutable shell state for commands like EXPAND, PAGING, and CAPTURE.
Fields§
§expand: boolWhether expanded (vertical) output is enabled.
paging_enabled: boolWhether to pipe output through the built-in pager.
is_tty: boolWhether stdout is a TTY (controls pager auto-disable).
debug: boolWhether debug mode is enabled (toggled via DEBUG command).
capture_file: Option<File>Active CAPTURE file handle (output is tee’d to this file).
capture_path: Option<PathBuf>Path of the active capture file (for display).
schema_cache: Option<Arc<RwLock<SchemaCache>>>Shared schema cache for tab completion (invalidated on DDL).
Shared current keyspace for tab completion.
colorizer: CqlColorizerOutput colorizer for result values, headers, and errors.
Implementations§
Source§impl ShellState
impl ShellState
Sourcefn outputln(&mut self, text: &str)
fn outputln(&mut self, text: &str)
Write output line to both stdout and the capture file (if active). Used for short shell command output that doesn’t need paging.
Sourcefn display_output(&mut self, content: &[u8], title: &str)
fn display_output(&mut self, content: &[u8], title: &str)
Display output, routing through the pager if enabled, and writing to capture file.
An optional title is shown at the top of the pager (e.g., column names).
Auto Trait Implementations§
impl Freeze for ShellState
impl !RefUnwindSafe for ShellState
impl Send for ShellState
impl Sync for ShellState
impl Unpin for ShellState
impl !UnwindSafe for ShellState
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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