/// Trait for priority queue implementations used in Dijkstra's algorithm.
////// This trait abstracts over different heap implementations (binary heap, Fibonacci heap,
/// pairing heap, etc.) to allow a single generic Dijkstra implementation.
pubtraitPriorityQueue{/// Handle type for nodes in the heap. Used for `decrease_key` operations.
/// For heaps that don't support `decrease_key`, this can be a unit type `()`.
typeHandle:Clone;/// Insert a node with the given key and node ID into the heap.
/// Returns a handle that can be used for `decrease_key` if supported.
fninsert(&mutself, key:u32, node_id:usize)->Self::Handle;/// Extract and return the minimum key and node ID from the heap.
/// Returns `None` if the heap is empty.
fnextract_min(&mutself)->Option<(u32, usize)>;/// Check if this heap implementation supports `decrease_key` operations.
/// If `false`, Dijkstra will re-insert nodes instead of decreasing their keys.
fnsupports_decrease_key(&self)->bool{false}/// Decrease the key of a node identified by its handle.
/// This method is only called if `supports_decrease_key()` returns `true`.
/// The implementation should be a no-op if `new_key >= current_key`.
fndecrease_key(&mutself, handle:&Self::Handle, new_key:u32);}