#[repr(i16)]pub enum SyncActionCodec {
InsertEdge = 1,
DeleteEdge = 2,
DeleteNode = 3,
TruncateOverlays = 4,
RemoveOverlayEdge = 5,
}Expand description
Persisted sync-log action type ids shared with trigger SQL.
Variants§
Implementations§
Source§impl SyncActionCodec
impl SyncActionCodec
Sourcepub const fn carries_node_keys(self) -> bool
pub const fn carries_node_keys(self) -> bool
Returns whether this action carries registered node-key arguments.
Insert and remove-overlay actions reference source/target node keys;
the others carry dense ids or nothing. Both Self::decode_wire and the
dense-map key harvest consult this so the keyed-action set lives in one
place instead of being a magic literal pair.
§Performance
This method is O(1).
Sourcepub fn decode_wire(
action_type: i16,
arg0: Option<i64>,
arg1: Option<i64>,
) -> Result<SyncActionWire, SyncError>
pub fn decode_wire( action_type: i16, arg0: Option<i64>, arg1: Option<i64>, ) -> Result<SyncActionWire, SyncError>
Sourcepub fn decode(
action_type: i16,
arg0: Option<i64>,
arg1: Option<i64>,
node_map: &BTreeMap<NodeKey, u32>,
) -> Result<SyncAction, SyncError>
pub fn decode( action_type: i16, arg0: Option<i64>, arg1: Option<i64>, node_map: &BTreeMap<NodeKey, u32>, ) -> Result<SyncAction, SyncError>
Decodes a persisted sync row into a dense SyncAction.
Keyed insert/remove actions require node_map built from the current
relational edge scan.
§Errors
Returns SyncError when decoding or dense resolution fails.
§Performance
This method is O(1) per row excluding map lookup.
Trait Implementations§
Source§impl Clone for SyncActionCodec
impl Clone for SyncActionCodec
Source§fn clone(&self) -> SyncActionCodec
fn clone(&self) -> SyncActionCodec
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 SyncActionCodec
impl Debug for SyncActionCodec
Source§impl PartialEq for SyncActionCodec
impl PartialEq for SyncActionCodec
Source§fn eq(&self, other: &SyncActionCodec) -> bool
fn eq(&self, other: &SyncActionCodec) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl TryFrom<i16> for SyncActionCodec
impl TryFrom<i16> for SyncActionCodec
impl Copy for SyncActionCodec
impl Eq for SyncActionCodec
impl StructuralPartialEq for SyncActionCodec
Auto Trait Implementations§
impl Freeze for SyncActionCodec
impl RefUnwindSafe for SyncActionCodec
impl Send for SyncActionCodec
impl Sync for SyncActionCodec
impl Unpin for SyncActionCodec
impl UnsafeUnpin for SyncActionCodec
impl UnwindSafe for SyncActionCodec
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