Skip to main content

calculate_edge_data_offset_in_cluster

Function calculate_edge_data_offset_in_cluster 

Source
pub fn calculate_edge_data_offset_in_cluster(edge_idx: usize) -> Option<usize>
Expand description

Calculate where edge data starts in cluster buffer

This function calculates the byte offset within an edge cluster where the actual edge data (JSON payload) for a specific edge begins.

§Arguments

  • edge_idx - Index of the edge within the cluster (0-based)

§Returns

Option containing byte offset from the start of the cluster buffer where edge data begins, or None if calculation fails

§Format Details

The actual format depends on the EdgeCluster implementation. This is an approximation that skips the neighbor_id (8 bytes) to get to the edge data region.