aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/parse2/internal_prelude.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-netdoc: Implement parse2 traits for Intern wrappersClara Engler2026-06-241-1/+2
| | | | | This commit implements ItemValueParseable and ItemArgumentParseable for Intern<T> types. This should be sufficient for the time being.
* tor-netcoc: NetdocParseableUnverified derive: forbid NetdocParseableIan Jackson2026-06-101-0/+1
|
* tor-netdoc: Rename NetdocUnverified trait to NetdocParseableUnverified (fmt)Ian Jackson2026-06-021-3/+3
|
* tor-netdoc: Rename NetdocUnverified trait to NetdocParseableUnverifiedIan Jackson2026-06-021-1/+1
| | | | | | | | | | | | The NetdocParseableUnverified derive macro implements this trait (amongst other things). Traits and derive macros should have aligned names. This is only used for parsing, so let's keep the "Parseable" part of the name. I don't think the effort of deprecated alias, for downstream compatibility, is worth it, our compatibility policy notwithstanding.
* tor-netdoc: parse2: Add missing ItemObjectParseable to prelude (fmt)Ian Jackson2026-04-291-2/+2
|
* tor-netdoc: parse2: Add missing ItemObjectParseable to preludeIan Jackson2026-04-291-1/+1
| | | | And remove a then-unneeded import in a using module.
* tor-netdoc: Apply deferred rustfmt churn to importsIan Jackson2026-03-191-3/+2
|
* tor-netdoc: parse2: Don't impl NetdocParseable for bodies of signed docsIan Jackson2026-03-191-0/+1
| | | | Such an impl is a footgun. Explain this in docs & comments.
* tor-netdoc: parse2: Move hash out of signature itemsIan Jackson2026-03-191-2/+2
| | | | | | | | | | During encoding, including these hashes in the signature items makes no sense. The hashes are an *input* to the signature items, but not part of them. Move the hashes out of the items. Instead, provide each signatures section type with a hash accumulator type, in which the hash(es) are stored.
* tor-netdoc: parse2: Introduce SignatureData structIan Jackson2026-03-191-1/+1
| | | | This is going to contain body information, and the hashes, too.
* tor-netdoc: NetdocParseableSignatures: Make into its own traitIan Jackson2026-03-191-0/+1
|
* tor-netdoc: Apply rustfmt churnIan Jackson2026-03-031-2/+2
|
* tor-netdoc: parse2: Use eprint for dtraceIan Jackson2026-03-031-2/+1
|
* tor-netdoc: Rename *Signed to *UnverifiedIan Jackson2026-03-031-1/+1
| | | | | | | | | | This was a weird name, and while working in this area it all seemed to make the docs strange. Rename it. This is quite invasive! In theory we could have the macros generate compatibility aliases, but that seems quite complex.
* tor-netdoc: Move NetdocSigned to signatures.rsIan Jackson2026-03-031-1/+2
| | | | | I keep not finding it because all the other signatures stuff is in signatures.rs.
* tor-netdoc: parse2: Provide NetdocParseable::is_structural_keyword (rustfmt)Ian Jackson2026-01-151-3/+2
|
* tor-netdoc: parse2: Provide NetdocParseable::is_structural_keywordIan Jackson2026-01-151-0/+1
| | | | Roughly as per the proposal in `doc/dev/notes/authcert-in-consensus.md`.
* tor-netdoc: parse2: debug: Fix scoping of netdoc_parseable_derive_debugIan Jackson2025-12-101-0/+1
| | | | | | While testing I discovered that the `#[deftly(netdoc(debug))]` feature (which dumps parsing progress to stderr) didn't compile if the derive was invoked from elsewhere.
* tor-netdoc: rustfmt to tidy up importsIan Jackson2025-11-191-4/+1
|
* tor-netdoc: parse2: Combine all the multiplicity SelectorsIan Jackson2025-11-191-2/+2
| | | | | There is no conflict between the different uses. Having just one type makes things simpler.
* tor-netdoc: Introduce Unknown and retain_unknown_values optionIan Jackson2025-11-181-0/+1
|
* tor-netdoc: parse2 derive: deduplication: start a moduleIan Jackson2025-11-061-1/+1
| | | | Put one textually-identical define in it, to start with.
* tor-netdoc: impl parse2 multiplicity for BTreeSetIan Jackson2025-10-151-1/+1
|
* tor-netdoc: impl parse2 traits for protoversIan Jackson2025-10-151-0/+1
|
* tor-netdoc: Introduce ArgumentErrorIan Jackson2025-10-091-1/+2
| | | | | This will allow us to (1) move field name handling out of the argument parser method, and also (2) add columns more easily.
* tor-netdoc: Have .reject_extra_args return a bespoke errorIan Jackson2025-10-091-1/+1
| | | | | | | We're about to have some functions return ArgumentError and some ErrorProblem. We don't want to provide a conversion directly between these types, so instead introduce a new type that will be convertible to either.
* tor-netdoc: Introduce `NormalItemArgument` impl-enabler traitIan Jackson2025-10-081-1/+1
| | | | | This is currently used to enable `parse2::ItemArgumentParseable`. In a moment it will enable `build::ItemArgument` too.
* tor-netdoc: parse2 poc: impl Display for several typesIan Jackson2025-10-081-1/+1
|
* netdoc parse2: Fix Object handling (fmt)Ian Jackson2025-09-291-2/+4
|
* netdoc parse2: Fix Object handlingIan Jackson2025-09-291-1/+2
| | | | | | | | | | Use the standard multiplicity technique rather than the ad-hoc impl on Option. This allows us to support an ad-hoc parsing function for a field that's `Option`. Disentangle the `label` field attribute, which did both setting the label, and expecting a different parsing approach: replace it with `with`.
* netdoc parse2: Actually use ArgumentSetSelector, and testIan Jackson2025-09-291-1/+1
| | | | Without this, parsing of Option and Vec argument fields doesn't work.
* netdoc parse2: Use $P::Result throughoutIan Jackson2025-09-291-0/+1
| | | | | This is needed when using these macros in a namespace with a local redefinition of `Result`.
* tor-netdoc: parse2: Provide flattening and NetdocParseableFieldsIan Jackson2025-09-021-1/+4
|
* tor-netdoc: Rerun cargo fmt after rebaseIan Jackson2025-08-141-2/+2
|
* tor-netdoc: Introduce parse2, new parserIan Jackson2025-08-141-0/+44
This isn't used anywhere yet. We're going to demonstrate it, and test the demo, in a moment.