#[repr(C, align(16))]pub struct Delta {
pub tag: DeltaTag,
pub sequence: u8,
pub source_tile: u8,
pub _reserved: u8,
pub timestamp: u32,
pub payload: DeltaPayload,
}Expand description
Complete delta message with tag
Fields§
§tag: DeltaTagDelta operation tag
sequence: u8Sequence number for ordering
source_tile: u8Source tile ID (for cross-tile deltas)
_reserved: u8Reserved for future use
timestamp: u32Timestamp (lower 32 bits of tick counter)
payload: DeltaPayloadDelta payload
Implementations§
Source§impl Delta
impl Delta
Sourcepub fn edge_add(
source: TileVertexId,
target: TileVertexId,
weight: FixedWeight,
) -> Self
pub fn edge_add( source: TileVertexId, target: TileVertexId, weight: FixedWeight, ) -> Self
Create an edge add delta
Sourcepub fn edge_remove(source: TileVertexId, target: TileVertexId) -> Self
pub fn edge_remove(source: TileVertexId, target: TileVertexId) -> Self
Create an edge remove delta
Sourcepub fn weight_update(
source: TileVertexId,
target: TileVertexId,
weight: FixedWeight,
) -> Self
pub fn weight_update( source: TileVertexId, target: TileVertexId, weight: FixedWeight, ) -> Self
Create a weight update delta
Sourcepub fn observation(obs: Observation) -> Self
pub fn observation(obs: Observation) -> Self
Create an observation delta
Sourcepub unsafe fn get_edge_add(&self) -> &EdgeAdd
pub unsafe fn get_edge_add(&self) -> &EdgeAdd
Get the edge add payload (unsafe: caller must verify tag)
Sourcepub unsafe fn get_edge_remove(&self) -> &EdgeRemove
pub unsafe fn get_edge_remove(&self) -> &EdgeRemove
Get the edge remove payload (unsafe: caller must verify tag)
Sourcepub unsafe fn get_weight_update(&self) -> &WeightUpdate
pub unsafe fn get_weight_update(&self) -> &WeightUpdate
Get the weight update payload (unsafe: caller must verify tag)
Sourcepub unsafe fn get_observation(&self) -> &Observation
pub unsafe fn get_observation(&self) -> &Observation
Get the observation payload (unsafe: caller must verify tag)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Delta
impl RefUnwindSafe for Delta
impl Send for Delta
impl Sync for Delta
impl Unpin for Delta
impl UnwindSafe for Delta
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