pub enum CassandraVersion {
Show 18 variants
Legacy,
V5_0Alpha,
V5_0Beta,
V5_0Release,
V5_0NewBig,
V5_0Bti,
V5_0DataFormat,
V5_0FormatC,
V5_0FormatD,
V5_0FormatE,
V5_0FormatF,
V5_0FormatG,
V5_0StaticColumns,
V5_0Uncompressed,
V5_0ComplexTypes,
V5_0TypedCollections,
V5_0WideRows,
V5_0NewBigFormat,
}Expand description
Cassandra version enum mapping magic numbers to versions
Variants§
Legacy
Legacy ‘oa’ format (backward compatibility)
V5_0Alpha
Cassandra 5.0 Alpha
V5_0Beta
Cassandra 5.0 Beta
V5_0Release
Cassandra 5.0 Release
V5_0NewBig
Cassandra 5.0 ‘nb’ (new big) format
V5_0Bti
Cassandra 5.0 BTI (Big Trie-Indexed) format
V5_0DataFormat
Cassandra 5.0 Data.db format (from real test data)
V5_0FormatC
Cassandra 5.0 Format C (from test data)
V5_0FormatD
Cassandra 5.0 Format D (from test data)
V5_0FormatE
Cassandra 5.0 Format E (composite keys)
V5_0FormatF
Cassandra 5.0 Format F (TTL support)
V5_0FormatG
Cassandra 5.0 Format G (counters)
V5_0StaticColumns
Cassandra 5.0 Static Columns format
Test data artifact found in test_basic/static_columns_table-*/nb-1-big-Data.db.
Magic number: 0xC051_5C00
V5_0Uncompressed
Cassandra 5.0 Uncompressed format
Test data artifact found in test_basic/uncompressed_table-*/nb-1-big-Data.db.
Magic number: 0x0010_045E
V5_0ComplexTypes
Cassandra 5.0 Complex Types format (frozen collections, UDTs, nested collections)
Test data artifact found in tables with complex type definitions:
test_collections/frozen_collections_table-*/nb-1-big-Data.db
Magic number: 0x8236_5C00
V5_0TypedCollections
Cassandra 5.0 Typed Collections format
Test data artifact found in test_collections/typed_collections_table-*/nb-1-big-Data.db.
Magic number: 0x0F3C_0000
V5_0WideRows
Cassandra 5.0 Wide Rows format (clustering columns, large partitions)
Test data artifact found in test_wide_rows/chat_messages-*/nb-1-big-Data.db.
Magic number: 0xF07C_5C00
V5_0NewBigFormat
Cassandra 5.0 NewBig Format with byte-comparable keys (CEP-25)
This format uses byte-comparable encoding for partition and clustering keys, which differs from VInt-based encoding. Keys use component separators (0x40) and terminators (0x38), with type-specific encodings (sign bit flipping for integers, escape sequences for text).
Magic number: 0xD464_5400
Implementations§
Source§impl CassandraVersion
impl CassandraVersion
Sourcepub fn magic_number(&self) -> u32
pub fn magic_number(&self) -> u32
Get the magic number for this version
Sourcepub fn from_magic_number(magic: u32) -> Option<CassandraVersion>
pub fn from_magic_number(magic: u32) -> Option<CassandraVersion>
Parse magic number to version with proper format detection
Sourcepub fn version_string(&self) -> &'static str
pub fn version_string(&self) -> &'static str
Get human-readable version string
Sourcepub fn data_format(&self) -> DataFormat
pub fn data_format(&self) -> DataFormat
Get the data format characteristics for this version
This method classifies Cassandra versions by their actual data encoding format:
- LegacyOA: Legacy ‘oa’ uncompressed format with older serialization
- V5CompressedLegacy: Cassandra 5.0 ‘nb’ (new big) compressed format that uses legacy serialization header encoding inside compressed blocks (u16 lengths, not VInt)
- V5UncompressedOA: Cassandra 5.0 true ‘oa’ format with VInt-encoded partition keys
§Critical Distinction
The V5_0DataFormat and related formats (C-G) use ‘nb’ naming and compression but encode partition keys and rows using the legacy serialization format inside decompressed blocks:
- Partition key component lengths: u16 big-endian (NOT VInt)
- Row encoding: Legacy serialization header format
- Should NOT use RowCellStateMachine (which expects VInt encoding)
Only V5_0NewBig and V5_0Bti use the true “oa” format with VInt encoding.
Sourcepub fn is_nb_format(&self) -> bool
pub fn is_nb_format(&self) -> bool
Check if this version uses the NB (New Big) chunked format.
NB format files are headerless, use the nb-{gen}-big- naming convention,
and read data via CompressionInfo.db chunk offsets (when compressed) or
raw sequential reads (when uncompressed).
Excludes V5_0Uncompressed (which also uses V5CompressedLegacy row format but has a different read path) and V5_0Bti (which uses OA format).
Trait Implementations§
Source§impl Clone for CassandraVersion
impl Clone for CassandraVersion
Source§fn clone(&self) -> CassandraVersion
fn clone(&self) -> CassandraVersion
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CassandraVersion
Source§impl Debug for CassandraVersion
impl Debug for CassandraVersion
Source§impl<'de> Deserialize<'de> for CassandraVersion
impl<'de> Deserialize<'de> for CassandraVersion
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>,
impl Eq for CassandraVersion
Source§impl PartialEq for CassandraVersion
impl PartialEq for CassandraVersion
Source§fn eq(&self, other: &CassandraVersion) -> bool
fn eq(&self, other: &CassandraVersion) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for CassandraVersion
impl Serialize for CassandraVersion
impl StructuralPartialEq for CassandraVersion
Auto Trait Implementations§
impl Freeze for CassandraVersion
impl RefUnwindSafe for CassandraVersion
impl Send for CassandraVersion
impl Sync for CassandraVersion
impl Unpin for CassandraVersion
impl UnsafeUnpin for CassandraVersion
impl UnwindSafe for CassandraVersion
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.