aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/parse2/traits.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-netdoc: NetdocParseableFields::Accumulator must be DefaultIan Jackson2026-07-211-1/+1
| | | | | | The macro-generated code for `#[deftly(netdoc(flatten))]` relies on this. The Default impl is genereated by the derive, but a generic or handwritten `NetdocParseableFields` wouldn't work.
* tor-basic-utils: Add GloballyInternable::into_intern()Clara Engler2026-06-241-2/+2
| | | | As a shorthand for T::intern_cache().intern(value).
* tor-netdoc: Implement parse2 traits for Intern wrappersClara Engler2026-06-241-0/+16
| | | | | This commit implements ItemValueParseable and ItemArgumentParseable for Intern<T> types. This should be sufficient for the time being.
* tor-netdoc: NetdocParseableFields: Pass ItemStream to finishIan Jackson2026-05-271-3/+6
|
* tor-netdoc: Move FromStr and Display from NormalItemArgument to implsIan Jackson2026-04-291-1/+1
| | | | | | | | | | | This allows implementing NormalItemArgument for types that can only be parsed, or only displayed - or other combinations. I noticed this restriction while inventing a type I later decided was unnecessary. I still think it's a good change. There is no practical impact elsewhere, since in practice downstream code implements NormalItemArgument rather than relying on it.
* tor-netdoc: parse2: Fix error for invalid item argumentIan Jackson2026-04-141-1/+1
| | | | When we can't parse a NormalItemArgument, that's Invalid, not Missing.
* tor-netdoc: ItemArgumentParseable for Arc<T>Clara Engler2026-04-021-0/+6
|
* tor-netdoc: Move NetdocSigned to signatures.rsIan Jackson2026-03-031-32/+0
| | | | | I keep not finding it because all the other signatures stuff is in signatures.rs.
* tor-netdoc: parse2: Provide NetdocParseable::is_structural_keywordIan Jackson2026-01-151-0/+43
| | | | Roughly as per the proposal in `doc/dev/notes/authcert-in-consensus.md`.
* tor-netdoc: Add two TODOs re trait namingIan Jackson2025-12-101-0/+2
|
* tor-netdoc: parse2 docs: Clarify that these are for parsingIan Jackson2025-11-191-3/+3
| | | | We're going to have separate traits for encoding.
* tor-netdoc: parse2 docs: Fix ItemObjectParseableIan Jackson2025-11-191-4/+1
| | | | Once upon a time this trait handled multiplicity. But it doesn't any more.
* tor-netdoc: blanket impl parse2 traits for ArcIan Jackson2025-10-211-0/+30
| | | | This replaces one ad-hoc impl and will avoid having to have any more.
* tor-netdoc: Abolish now-obsolete field argument to from_args (fmt)Ian Jackson2025-10-091-3/+1
|
* tor-netdoc: Abolish now-obsolete field argument to from_argsIan Jackson2025-10-091-3/+1
|
* tor-netdoc: Introduce ArgumentErrorIan Jackson2025-10-091-7/+7
| | | | | 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: 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: Break out check_no_objectIan Jackson2025-10-061-1/+1
| | | | This will be useful for impls of ItemValueParseable.
* netdoc parse2: Fix Object handlingIan Jackson2025-09-291-24/+0
| | | | | | | | | | 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`.
* tor-netdoc: parse2: Provide flattening and NetdocParseableFieldsIan Jackson2025-09-021-0/+27
|
* tor-netdoc: Introduce parse2, new parserIan Jackson2025-08-141-0/+183
This isn't used anywhere yet. We're going to demonstrate it, and test the demo, in a moment.