Skip to main content

CassandraVersion

Enum CassandraVersion 

Source
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

Source

pub fn magic_number(&self) -> u32

Get the magic number for this version

Source

pub fn from_magic_number(magic: u32) -> Option<CassandraVersion>

Parse magic number to version with proper format detection

Source

pub fn version_string(&self) -> &'static str

Get human-readable version string

Source

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.

Source

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

Source§

fn clone(&self) -> CassandraVersion

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for CassandraVersion

Source§

impl Debug for CassandraVersion

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CassandraVersion

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for CassandraVersion

Source§

impl PartialEq for CassandraVersion

Source§

fn eq(&self, other: &CassandraVersion) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for CassandraVersion

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for CassandraVersion

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.