1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// Copyright (c) 2026 2youg1 and the sprawling contributors
//! The files under one address whose name holds a text
//! (`crates/wire/spec/Answer/Find.lean` ยง8-82).
//!
//! A page that wants one name cannot ask `Listing` level by level: a
//! deep tree is dozens of round trips before it can say "none", and a
//! directory the page never asked is one it cannot speak for. The city
//! walks the tree once and says whether that walk reached the end.
use Address;
use ;
/// How many files one answer lists: a bound on the answer's size on
/// the wire, and as many as a list a person picks one file from needs.
pub const FIND_MAX: usize = 50;
/// How many entries one walk looks at before it stops: the cost of one
/// question, paid on every key the person types.
pub const FIND_WALK_MAX: usize = 20_000;
/// Whether the walk looked at everything under the address.
/// The files found, shallow first and in name order within one level,
/// each relative to `under`. `under` and `text` echo the question,
/// which the wire carries no id for.