pub struct MaterializedRecord { /* private fields */ }Expand description
One record replacement or deletion applied in the commit metadata transaction.
Implementations§
Source§impl MaterializedRecord
impl MaterializedRecord
Sourcepub fn upsert(
schema: SchemaDescriptor,
record_id: Vec<u8>,
state: Vec<u8>,
indexes: Vec<IndexValue>,
) -> Result<Self, MaterializedError>
pub fn upsert( schema: SchemaDescriptor, record_id: Vec<u8>, state: Vec<u8>, indexes: Vec<IndexValue>, ) -> Result<Self, MaterializedError>
Validates a complete canonical record replacement and its index values.
Sourcepub fn delete(
schema: SchemaDescriptor,
record_id: Vec<u8>,
) -> Result<Self, MaterializedError>
pub fn delete( schema: SchemaDescriptor, record_id: Vec<u8>, ) -> Result<Self, MaterializedError>
Validates a record deletion under its registered schema.
Sourcepub fn state(&self) -> Option<&[u8]>
pub fn state(&self) -> Option<&[u8]>
Returns complete canonical record state, or None for deletion.
Sourcepub fn indexes(&self) -> &[IndexValue]
pub fn indexes(&self) -> &[IndexValue]
Returns canonical secondary-index values.
Sourcepub fn encode_canonical(&self) -> Result<Vec<u8>, MaterializedError>
pub fn encode_canonical(&self) -> Result<Vec<u8>, MaterializedError>
Encodes the complete rebuildable materialization carried by a commit operation.
Sourcepub fn decode_canonical(bytes: &[u8]) -> Result<Self, MaterializedError>
pub fn decode_canonical(bytes: &[u8]) -> Result<Self, MaterializedError>
Strictly decodes and validates a commit-carried materialization.
Trait Implementations§
Source§impl Clone for MaterializedRecord
impl Clone for MaterializedRecord
Source§fn clone(&self) -> MaterializedRecord
fn clone(&self) -> MaterializedRecord
Returns a duplicate of the value. Read more
1.0.0 · 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 MaterializedRecord
impl Debug for MaterializedRecord
Source§impl PartialEq for MaterializedRecord
impl PartialEq for MaterializedRecord
impl Eq for MaterializedRecord
impl StructuralPartialEq for MaterializedRecord
Auto Trait Implementations§
impl Freeze for MaterializedRecord
impl RefUnwindSafe for MaterializedRecord
impl Send for MaterializedRecord
impl Sync for MaterializedRecord
impl Unpin for MaterializedRecord
impl UnwindSafe for MaterializedRecord
Blanket Implementations§
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