#[repr(C)]pub struct DagPosition {
pub depth: u32,
pub lane: u32,
pub sequence: u32,
}Expand description
Position of an event in the DAG.
The DAG position uniquely identifies where an event sits in the event graph.
depth: Distance from the root event (0 = root)lane: Parallel track for fan-out scenariossequence: Monotonic counter within a lane
Fields§
§depth: u32Distance from the root event (0 = root event)
lane: u32Parallel track number for fan-out (0 = main track)
sequence: u32Monotonic sequence number within the lane
Implementations§
Source§impl DagPosition
impl DagPosition
Sourcepub const fn fork(&self, new_lane: u32, sequence: u32) -> Self
pub const fn fork(&self, new_lane: u32, sequence: u32) -> Self
Create a position on a new lane (fork).
Sourcepub const fn is_ancestor_of(&self, other: &Self) -> bool
pub const fn is_ancestor_of(&self, other: &Self) -> bool
Check if this position is a potential ancestor of another based on depth and lane.
Returns true if self is at a shallower depth on the same lane as other.
Note: this is a necessary but not sufficient condition for true ancestry —
it does not verify sequence continuity along the parent chain.
Trait Implementations§
Source§impl Clone for DagPosition
impl Clone for DagPosition
Source§fn clone(&self) -> DagPosition
fn clone(&self) -> DagPosition
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 ComposeSchema for DagPosition
impl ComposeSchema for DagPosition
Source§impl Debug for DagPosition
impl Debug for DagPosition
Source§impl Default for DagPosition
impl Default for DagPosition
Source§impl<'de> Deserialize<'de> for DagPosition
impl<'de> Deserialize<'de> for DagPosition
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
Source§impl Display for DagPosition
impl Display for DagPosition
Source§impl Hash for DagPosition
impl Hash for DagPosition
Source§impl PartialEq for DagPosition
impl PartialEq for DagPosition
Source§impl Serialize for DagPosition
impl Serialize for DagPosition
Source§impl ToSchema for DagPosition
impl ToSchema for DagPosition
impl Copy for DagPosition
impl Eq for DagPosition
impl StructuralPartialEq for DagPosition
Auto Trait Implementations§
impl Freeze for DagPosition
impl RefUnwindSafe for DagPosition
impl Send for DagPosition
impl Sync for DagPosition
impl Unpin for DagPosition
impl UnwindSafe for DagPosition
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.