max / quasi
- Co-Authored-By
- Claude Opus 5 (1M context) <noreply@anthropic.com>
1 file changed,
+23 insertions,
-1 deletion
| @@ -271,6 +271,13 @@ | |||
| 271 | 271 | /// save dialog, a browser downloads, a terminal writes to the working | |
| 272 | 272 | /// directory. One description, the same reading on every host. | |
| 273 | 273 | /// | |
| 274 | + | /// Not the way to ask the reader to NAME a file. This member has the file | |
| 275 | + | /// already and is handing it over; a route that wants a destination first, | |
| 276 | + | /// with a suggestion in the dialog, asks for | |
| 277 | + | /// [`Sought::Save`](Sought::Save) through [`Locate`](Self::Locate). The | |
| 278 | + | /// save dialog named above is how a host performs this one, not a way to | |
| 279 | + | /// choose where it lands. | |
| 280 | + | /// | |
| 274 | 281 | /// # Why the destination is not in the request | |
| 275 | 282 | /// | |
| 276 | 283 | /// It is the exact mirror of the upload ruling (`108557ec`, 2026-08-18): | |
| @@ -585,9 +592,24 @@ | |||
| 585 | 592 | /// [`Field::upload`](crate::Field::upload)'s converse reason: a missing | |
| 586 | 593 | /// accept list is a real choice and has to be argued, and a route with | |
| 587 | 594 | /// nothing to show a label on is the common case. | |
| 595 | + | /// | |
| 596 | + | /// # It must differ from [`under`](Self::under) | |
| 597 | + | /// | |
| 598 | + | /// Handle and label go on under their own names, so giving both the same | |
| 599 | + | /// name interleaves them: `get_all(under)` then yields handle, label, | |
| 600 | + | /// handle, label and the route reads every second value as a path. One | |
| 601 | + | /// pick used to hide this, because `get(under)` still returned the handle; | |
| 602 | + | /// batching does not, and `get_all` is the documented reader now. Caught | |
| 603 | + | /// here in debug rather than left to look like a picker that answers twice. | |
| 588 | 604 | #[must_use] | |
| 589 | 605 | pub fn showing(mut self, labelled: impl Into<String>) -> Self { | |
| 590 | - | self.labelled = Some(labelled.into()); | |
| 606 | + | let labelled = labelled.into(); | |
| 607 | + | debug_assert_ne!( | |
| 608 | + | labelled, self.under, | |
| 609 | + | "a Locating's label name and handle name must differ, or one ask answers both under \ | |
| 610 | + | the same key and every second value reads as a handle", | |
| 611 | + | ); | |
| 612 | + | self.labelled = Some(labelled); | |
| 591 | 613 | self | |
| 592 | 614 | } | |
| 593 | 615 |