pub enum SyncDirection {
Upward,
Downward,
Lateral,
Broadcast,
}Expand description
Sync direction for hierarchical routing (Issue #438 Phase 3)
Determines how sync messages should be routed based on document type:
- Upward: Sync to parent/leader only (nodes, beacons, platforms)
- Downward: Sync from leader to members (commands)
- Lateral: Sync to peers at same level (cells)
- Broadcast: Sync to all connected peers (alerts, contact_reports)
Variants§
Upward
Sync upward to parent/leader only Used for: nodes, beacons, platforms
Downward
Sync downward from leader to members Used for: commands
Lateral
Sync laterally to peers at same hierarchy level Used for: cells
Broadcast
Broadcast to all connected peers (existing behavior) Used for: alerts, contact_reports, and unknown collections
Implementations§
Source§impl SyncDirection
impl SyncDirection
Sourcepub fn from_doc_key(doc_key: &str) -> SyncDirection
pub fn from_doc_key(doc_key: &str) -> SyncDirection
Determine sync direction from document key
Parses the collection name from the document key (format: “collection:id”) and returns the appropriate sync direction.
Trait Implementations§
Source§impl Clone for SyncDirection
impl Clone for SyncDirection
Source§fn clone(&self) -> SyncDirection
fn clone(&self) -> SyncDirection
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 SyncDirection
impl Debug for SyncDirection
Source§impl PartialEq for SyncDirection
impl PartialEq for SyncDirection
impl Copy for SyncDirection
impl Eq for SyncDirection
impl StructuralPartialEq for SyncDirection
Auto Trait Implementations§
impl Freeze for SyncDirection
impl RefUnwindSafe for SyncDirection
impl Send for SyncDirection
impl Sync for SyncDirection
impl Unpin for SyncDirection
impl UnsafeUnpin for SyncDirection
impl UnwindSafe for SyncDirection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more