pub struct Config {Show 21 fields
pub default_database: Option<PathBuf>,
pub connection: ConnectionConfig,
pub output: OutputSettings,
pub performance: PerformanceConfig,
pub logging: LoggingConfig,
pub repl: ReplConfig,
pub data_directory: Option<PathBuf>,
pub default_keyspace: Option<String>,
pub enable_history: Option<bool>,
pub enable_completion: Option<bool>,
pub show_timing: Option<bool>,
pub page_size: Option<usize>,
pub enable_paging: Option<bool>,
pub no_color: bool,
pub schema_paths: Vec<PathBuf>,
pub execution_query: Option<String>,
pub execution_file: Option<PathBuf>,
pub output_mode: Option<String>,
pub query_limit: Option<usize>,
pub cassandra_version: Option<String>,
pub resolved_version: Option<ResolvedVersion>,
}Fields§
§default_database: Option<PathBuf>§connection: ConnectionConfig§output: OutputSettings§performance: PerformanceConfig§logging: LoggingConfig§repl: ReplConfig§data_directory: Option<PathBuf>§default_keyspace: Option<String>§enable_history: Option<bool>§enable_completion: Option<bool>§show_timing: Option<bool>§page_size: Option<usize>§enable_paging: Option<bool>§no_color: bool§schema_paths: Vec<PathBuf>Schema file paths (supports multiple sources)
execution_query: Option<String>One-shot execution query (from -e flag)
execution_file: Option<PathBuf>One-shot execution file (from -f flag)
output_mode: Option<String>Output mode for query results (table/json/csv)
query_limit: Option<usize>Maximum rows for queries
cassandra_version: Option<String>Cassandra version hint from CLI flag (for precedence chain)
resolved_version: Option<ResolvedVersion>Resolved version information (computed async after config load) TODO(Issue #130): Used by :status meta-command (not yet implemented)
Implementations§
Source§impl Config
impl Config
pub fn load(config_path: Option<PathBuf>, cli: &Cli) -> Result<Self>
Sourcepub async fn resolve_version(&mut self, platform: Arc<Platform>) -> Result<()>
pub async fn resolve_version(&mut self, platform: Arc<Platform>) -> Result<()>
Resolve Cassandra version using precedence chain (Issue #130)
This method implements the version hint precedence:
- User override (–cassandra-version flag)
- SSTable metadata
- metadata.yml
- Unknown
§Arguments
platform- Platform abstraction for file I/O
§Errors
Returns an error only for fatal I/O errors. Missing metadata is not an error.
TODO(Issue #130): Used by :status meta-command (not yet implemented)
Sourcepub fn version_info(&self) -> Option<&ResolvedVersion>
pub fn version_info(&self) -> Option<&ResolvedVersion>
Get resolved version information for display/diagnostics
Returns None if version resolution has not been performed yet.
Call resolve_version() first to populate this field.
TODO(Issue #130): Used by :status meta-command (not yet implemented)
Sourcepub fn version_string(&self) -> String
pub fn version_string(&self) -> String
Get version string for display (returns “unknown” if not resolved)
TODO(Issue #130): Used by :status meta-command (not yet implemented)
Sourcepub fn version_source(&self) -> String
pub fn version_source(&self) -> String
Get version source description
TODO(Issue #130): Used by :status meta-command (not yet implemented)
pub fn save_to_file(&self, path: &Path) -> Result<()>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
impl<T> Allocation for T
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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