Skip to main content

CellData

Struct CellData 

Source
pub struct CellData {
    pub column: String,
    pub value: Value,
    pub timestamp: i64,
    pub ttl: Option<u32>,
    pub cell_path: Option<Vec<u8>>,
    pub local_deletion_time: Option<i32>,
    pub is_complex_element: bool,
    pub is_deleted: bool,
    pub has_empty_value: bool,
}
Expand description

Cell data with timestamp, optional TTL, and (for complex columns) cell path.

§Per-cell merge metadata (issue #886 — byte-parity foundation)

To reconcile per-cell and per-element data byte-faithfully (Cassandra Cells#reconcile), the merge entry must carry more than a single row-level timestamp. The fields below thread that richer state from the reader toward the followup behaviors (#844 per-cell-path collection/UDT merge, #848 tombstone-vs-expiring TTL tie-break). They are carried but not yet acted on by reconciliation — this struct change is plumbing only and must not alter output bytes.

Where the reader does not yet surface a value the field is left None; the dependent issues fill it in once the reader is extended.

Fields§

§column: String

Column name

§value: Value

Column value

§timestamp: i64

Cell timestamp (microseconds)

§ttl: Option<u32>

TTL in seconds (None = no expiration)

§cell_path: Option<Vec<u8>>

Cell path for a complex (collection / non-frozen UDT) element — the serialized element key/index that distinguishes one element of a multi-cell column from another (issue #886 substrate).

Carry-only. This field is threaded through the merge entry so that per-element reconciliation can become byte-faithful, but nothing populates or consumes it yet: the reader still collapses collections to a single whole-column CellData and the writer does not read this field. Population (per-element reader emit) and consumption (per-path merge #844) land in the follow-up #899. None for simple cells.

§local_deletion_time: Option<i32>

Local deletion time in seconds since the Unix epoch for this cell (the on-disk localDeletionTime), used by gc_grace purging and expiring-cell tie-breaks (issue #886 substrate).

For an expiring (TTL) cell this is the cell’s expiration instant; for a cell tombstone it is when the delete was applied.

Populated for complex (collection / UDT) elements on the compaction read path (epic #899, Phase C); None for simple cells whose LDT the reader does not surface, and for live simple cells.

§is_complex_element: bool

True when this CellData represents a single ELEMENT of a non-frozen complex column (a list/set member or a map entry), as opposed to a simple single-cell column (epic #899, Phase C).

When true, cell_path is the element’s authoritative on-disk path and the merge→mutation step emits a CellOperation::WriteComplexElement (preserving per-element ts/ttl/ldt/path) rather than a whole-column Write. false for every simple cell (whole-column collapse no longer happens on the production path).

§is_deleted: bool

Authoritative IS_DELETED (0x01) flag for a complex element (epic #899, Phase C). Carried verbatim from ComplexElement::is_deleted — NOT re-derived from value/ttl/ldt shape, so an expiring SET member (empty value, ttl + ldt set) is correctly NOT treated as a tombstone (no-heuristics mandate). Always false for simple cells (a simple cell tombstone rides in value as Value::Tombstone).

§has_empty_value: bool

On-disk HAS_EMPTY_VALUE (0x04) flag for a complex element (epic #899, Phase C). true for a SET member (whose identity lives in the cell_path) and any genuinely empty-value element, so the writer reproduces the same on-disk emptiness rather than re-deriving it from the decoded value. Always false for simple cells.

Implementations§

Source§

impl CellData

Source

pub fn new(column: String, value: Value, timestamp: i64) -> Self

Construct a simple live cell with no TTL, local-deletion-time, or cell path. The richer fields default to None; populate them explicitly when the reader supplies them (issues #844 / #848).

Trait Implementations§

Source§

impl Clone for CellData

Available on crate feature write-support only.

Manual Clone (was #[derive(Clone)]) so the #1665 reconcile micro-alloc guard can count CellData clones via a #[cfg(test)]-gated recorder. The clone is field-wise identical to the former derived clone (all 9 fields); in a production (non-test) build the record() call vanishes entirely, so this is a plain field-wise clone with ZERO added cost (mirrors MergeEntry’s #1664 manual clone).

Source§

fn clone(&self) -> Self

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 Debug for CellData

Source§

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

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

impl Eq for CellData

Source§

impl PartialEq for CellData

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CellData

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<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

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> 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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more