pub struct DualTopologySnapshot;Expand description
Forward CSR plus inbound CSC snapshot bytes with Postgres metadata.
Implementations§
Source§impl DualTopologySnapshot
impl DualTopologySnapshot
Sourcepub fn from_edge_rows(
edges: &[EdgeRow],
built_at_unix: u64,
) -> Result<Vec<u8>, PostgresGraphError>
pub fn from_edge_rows( edges: &[EdgeRow], built_at_unix: u64, ) -> Result<Vec<u8>, PostgresGraphError>
Builds OXGTOPO bytes from scanned edge rows.
Node indices are assigned in ascending NodeKey order. Catalog registration is
validated separately via crate::Catalog::validate_for_build or
crate::SnapshotRebuild::from_catalog_and_edges.
§Errors
Returns PostgresGraphError::Build when edge rows are empty or graph construction fails.
§Performance
This function is O(n log n + m) where n is distinct nodes and m is edges.
Sourcepub fn from_dense_u32_edges(
edges: &[(u32, u32)],
built_at_unix: u64,
) -> Result<Vec<u8>, PostgresGraphError>
pub fn from_dense_u32_edges( edges: &[(u32, u32)], built_at_unix: u64, ) -> Result<Vec<u8>, PostgresGraphError>
Builds OXGTOPO bytes from dense 0..node_count-1 node ids (tests and benches).
§Errors
Returns PostgresGraphError::Build when edges is empty or construction fails.
§Performance
This function is O(n + m) for n nodes and m edges.
Sourcepub fn from_dense_u32_edges_with_node_count(
node_count: u32,
edges: &[(u32, u32)],
built_at_unix: u64,
) -> Result<Vec<u8>, PostgresGraphError>
pub fn from_dense_u32_edges_with_node_count( node_count: u32, edges: &[(u32, u32)], built_at_unix: u64, ) -> Result<Vec<u8>, PostgresGraphError>
Builds OXGTOPO bytes with an explicit node count (tests with isolated vertices).
§Errors
Returns PostgresGraphError::Build when node_count is zero, an edge endpoint is out of
range, or construction fails.
§Performance
This function is O(n + m) for n nodes and m edges.
Trait Implementations§
Source§impl Clone for DualTopologySnapshot
impl Clone for DualTopologySnapshot
Source§fn clone(&self) -> DualTopologySnapshot
fn clone(&self) -> DualTopologySnapshot
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 DualTopologySnapshot
impl Debug for DualTopologySnapshot
Source§impl Default for DualTopologySnapshot
impl Default for DualTopologySnapshot
Source§fn default() -> DualTopologySnapshot
fn default() -> DualTopologySnapshot
Source§impl PartialEq for DualTopologySnapshot
impl PartialEq for DualTopologySnapshot
Source§fn eq(&self, other: &DualTopologySnapshot) -> bool
fn eq(&self, other: &DualTopologySnapshot) -> bool
self and other values to be equal, and is used by ==.