pub enum CellOperation {
Write {
column: String,
value: Value,
},
WriteWithTtl {
column: String,
value: Value,
ttl_seconds: u32,
},
Delete {
column: String,
},
DeleteRow,
}Expand description
Operations that can be applied to individual cells within a row.
§Per-Cell TTL
Per-cell TTL is supported via the WriteWithTtl variant when using
the JSON mutation format directly. CQL syntax (USING TTL) applies
TTL uniformly to all cells in a statement. To set different TTLs
per column, submit separate mutations or use JSON mutations with
WriteWithTtl:
{"WriteWithTtl": {"column": "session_token", "value": {"Text": "abc"}, "ttl_seconds": 3600}}Variants§
Write
Write a value to a column
WriteWithTtl
Write a value to a column with TTL (expiring cell).
The cell will expire after ttl_seconds seconds. This is the only
way to set per-column TTL — CQL USING TTL applies to all cells
in a statement. Use JSON mutations to set different TTLs per column.
Delete
Delete a specific column
DeleteRow
Delete entire row (row tombstone)
Trait Implementations§
Source§impl Clone for CellOperation
impl Clone for CellOperation
Source§fn clone(&self) -> CellOperation
fn clone(&self) -> CellOperation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CellOperation
impl Debug for CellOperation
Source§impl<'de> Deserialize<'de> for CellOperation
impl<'de> Deserialize<'de> for CellOperation
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CellOperation
impl RefUnwindSafe for CellOperation
impl Send for CellOperation
impl Sync for CellOperation
impl Unpin for CellOperation
impl UnsafeUnpin for CellOperation
impl UnwindSafe for CellOperation
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