pub struct SpacetimeStamp {
pub instant_nanos: i64,
pub position: Position,
}Expand description
A space-aware timestamp — when (a SmoothUTC instant, nanoseconds) AND where (a position in space). This is the heart of the light-cone model: two events can only be causally ordered if their time separation is at least the light-travel time between their positions. Closer in time than that and they are spacelike-separated — genuinely concurrent, no signal could connect them, which is exactly where CRDTs (conflict-free, order-free merge) are the right tool.
Fields§
§instant_nanos: i64§position: PositionImplementations§
Source§impl SpacetimeStamp
impl SpacetimeStamp
Sourcepub fn light_separation_nanos(self, other: SpacetimeStamp) -> i64
pub fn light_separation_nanos(self, other: SpacetimeStamp) -> i64
The light-travel time (nanoseconds) between the two events’ positions — the minimum time separation for a causal link. Symmetric.
Sourcepub fn causal_relation(self, other: SpacetimeStamp) -> CausalRelation
pub fn causal_relation(self, other: SpacetimeStamp) -> CausalRelation
The causal relation to other, decided by the light cone: causally ordered only when the
time gap covers the spatial (light) gap; otherwise spacelike-concurrent.
Sourcepub fn observed_at_nanos(self, observer: Position) -> i64
pub fn observed_at_nanos(self, observer: Position) -> i64
The instant this event is observed from observer (its own time + the light delay across
the distance) — the space-aware generalisation of observed_arrival_nanos.
Trait Implementations§
Source§impl Clone for SpacetimeStamp
impl Clone for SpacetimeStamp
Source§fn clone(&self) -> SpacetimeStamp
fn clone(&self) -> SpacetimeStamp
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SpacetimeStamp
impl Debug for SpacetimeStamp
Source§impl PartialEq for SpacetimeStamp
impl PartialEq for SpacetimeStamp
Source§fn eq(&self, other: &SpacetimeStamp) -> bool
fn eq(&self, other: &SpacetimeStamp) -> bool
self and other values to be equal, and is used by ==.