Skip to main content

nodedb_graph/
bfs_params.rs

1// SPDX-License-Identifier: Apache-2.0
2
3//! Parameter bundle for BFS traversal, shared by the durable and
4//! read-your-own-writes (overlay) traversal paths.
5
6use crate::csr::Direction;
7
8/// Bundled BFS traversal arguments. Keeps `traverse_bfs` / `traverse_bfs_overlay`
9/// / `traverse_bfs_dense` under clippy's argument-count limit without changing
10/// traversal semantics.
11pub struct BfsParams<'a> {
12    pub start_nodes: &'a [&'a str],
13    /// Empty keeps every edge. Otherwise an edge whose label is any listed
14    /// label passes.
15    pub label_filter: &'a [&'a str],
16    pub direction: Direction,
17    pub max_depth: usize,
18    pub max_visited: usize,
19    pub frontier_bitmap: Option<&'a nodedb_types::SurrogateBitmap>,
20}