pub struct Scanner { /* private fields */ }Expand description
Scanner for discovering SSTables in a data directory
Implementations§
Source§impl Scanner
impl Scanner
Sourcepub fn new(data_dir: &Path, version_hint: Option<String>) -> Self
pub fn new(data_dir: &Path, version_hint: Option<String>) -> Self
Create a new scanner for the given data directory
Sourcepub fn scan(&self) -> Result<ScanResult>
pub fn scan(&self) -> Result<ScanResult>
Scan the data directory for SSTables
This method scans the data directory structure and discovers:
- Keyspaces (excluding system keyspaces)
- Tables (excluding system tables)
- SSTable files (Data.db files)
Cassandra data directory structure is: data_dir/keyspace_name/table_name-table_id/sstable_files
Sourcepub fn resolve_version(
&self,
_scan_result: &ScanResult,
) -> Result<Option<String>>
pub fn resolve_version( &self, _scan_result: &ScanResult, ) -> Result<Option<String>>
Resolve Cassandra version using precedence:
- version_hint (if provided)
- SSTable metadata (from Data.db headers)
- metadata.yml (cluster metadata)
- “unknown” (fallback)
Auto Trait Implementations§
impl Freeze for Scanner
impl RefUnwindSafe for Scanner
impl Send for Scanner
impl Sync for Scanner
impl Unpin for Scanner
impl UnsafeUnpin for Scanner
impl UnwindSafe for Scanner
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
Mutably borrows from an owned value. Read more