| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | tor-netdoc: Document that parse2 vs encode multiplicity match req't | Ian Jackson | 2026-05-18 | 1 | -0/+15 |
| | | |||||
| * | tor-netdoc: Introduce RetainedOrderVec parse/encode type | Ian Jackson | 2026-04-23 | 1 | -0/+23 |
| | | |||||
| * | tor-netdoc: parse2 multiplicity: Add debugging methods to traits | Ian Jackson | 2026-04-13 | 1 | -0/+99 |
| | | |||||
| * | Fix typos | Tobias Stoeckmann | 2026-03-24 | 1 | -1/+1 |
| | | | | | Typos found with codespell | ||||
| * | tor-netdoc: parse2: Move hash out of signature items | Ian Jackson | 2026-03-19 | 1 | -1/+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: Provide NetdocParseable::is_structural_keyword | Ian Jackson | 2026-01-15 | 1 | -0/+8 |
| | | | | | Roughly as per the proposal in `doc/dev/notes/authcert-in-consensus.md`. | ||||
| * | tor-netdoc: encoding: Provide multiplicity module | Ian Jackson | 2025-12-10 | 1 | -1/+12 |
| | | | | | | | | | This is quite like the one for parse2, but separate for Reasons. Also add a bit of explanation to parse2's multiplicity.rs, about why there are all these different FooSetMethods traits, which the encoder doesn't need. | ||||
| * | tor-netdoc: NetdocParseable: Document that BTreeSet is allowed | Ian Jackson | 2025-12-10 | 1 | -0/+4 |
| | | | | | | | | When we implemented this we documented it for ItemValueParseable but forgot to do so for NetdocParseable. Add some xrefs to the traits to try to stop similar mistakes. | ||||
| * | tor-netdoc: parse2: Combine all the multiplicity Selectors | Ian Jackson | 2025-11-19 | 1 | -44/+29 |
| | | | | | | There is no conflict between the different uses. Having just one type makes things simpler. | ||||
| * | tor-netdoc: parse2: Move multiplicity docs examples into Methods traits | Ian Jackson | 2025-11-19 | 1 | -32/+32 |
| | | | | | | | | We're going to combine all the Selector types, so it won't be able to have these. The diff is misleading: it's docs for the Selectors that's moving. | ||||
| * | tor-netdoc: parse2: Introduce ParseInput intermediate struct | Ian Jackson | 2025-11-18 | 1 | -4/+6 |
| | | | | | | | | We're going to add options arguments, effectively, to the parsing entrypoints. To avoid a proliferation of entrypoints (eg, parse_multiple_with_options), encapsulate the run-time input values in this structure. | ||||
| * | tor-netdoc: impl parse2 multiplicity for BTreeSet | Ian Jackson | 2025-10-15 | 1 | -0/+33 |
| | | |||||
| * | tor-netdoc: Abolish now-obsolete field argument to from_args (fmt) | Ian Jackson | 2025-10-09 | 1 | -20/+4 |
| | | |||||
| * | tor-netdoc: Abolish now-obsolete field argument to from_args | Ian Jackson | 2025-10-09 | 1 | -12/+8 |
| | | |||||
| * | tor-netdoc: Introduce ArgumentError | Ian Jackson | 2025-10-09 | 1 | -8/+8 |
| | | | | | | 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: parse2: Rename methods on ArgumentStream | Ian Jackson | 2025-10-09 | 1 | -2/+2 |
| | | |||||
| * | netdoc parse2 tests: Avoid <String as TryFrom<Vec<u8>>> (3) | Ian Jackson | 2025-09-29 | 1 | -1/+1 |
| | | |||||
| * | netdoc parse2: ArgumentSetMethods: take a parser function | Ian Jackson | 2025-09-29 | 1 | -12/+59 |
| | | | | | We need this to support `with`. | ||||
| * | netdoc parse2: New single_item attribute | Ian Jackson | 2025-09-29 | 1 | -0/+6 |
| | | | | | | | Many of the existing netdoc structs have items that are just the single argument. We don't want to turn them all into singleton tuples. Provide a macro feature for this instead. | ||||
| * | netdoc parse2: Fix Object handling | Ian Jackson | 2025-09-29 | 1 | -0/+75 |
| | | | | | | | | | | | 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`. | ||||
| * | Produce better error messages from bad field types (fmt) | Ian Jackson | 2025-09-02 | 1 | -3/+15 |
| | | | | | Worsify formatting as demanded by rustfmt. | ||||
| * | Produce better error messages from bad field types | Ian Jackson | 2025-09-02 | 1 | -0/+10 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, this diff > --- a/crates/tor-netdoc/src/parse2/poc/netstatus.rs > +++ b/crates/tor-netdoc/src/parse2/poc/netstatus.rs > @@ -24,5 +24,4 @@ pub enum NdaNetworkStatusVersion { > /// `params` value > #[derive(Clone, Debug, Default, Deftly)] > -#[derive_deftly(ItemValueParseable)] > #[non_exhaustive] > pub struct NdiParams { gives the errors below. So the first reported error points to the errant field, albeit with the slightly mendacious phrasing "this call". Previously there was only the 2nd message. Disagnosing that requires hunting through the document struct looking for fields of the right type, which can be seriously awkward when there are type aliases involved as there often are in tor-netdoc. > error[E0277]: the trait bound `parse2::poc::netstatus::NdiParams: parse2::traits::ItemValueParseable` is not satisfied > --> crates/tor-netdoc/src/parse2/poc/netstatus/flavoured.rs:27:10 > | > 27 | #[derive(Deftly, Clone, Debug)] > | ^^^^^^ the trait `parse2::traits::ItemValueParseable` is not implemented for `parse2::poc::netstatus::NdiParams` > ... > 55 | pub params: NdiParams, > | ------ required by a bound introduced by this call > | > = help: the following other types implement trait `parse2::traits::ItemValueParseable`: > () > (T0, T1) > (T0, T1, T2) > (T0, T1, T2, T3) > (T0, T1, T2, T3, T4) > (T0, T1, T2, T3, T4, T5) > (T0, T1, T2, T3, T4, T5, T6) > (T0, T1, T2, T3, T4, T5, T6, T7) > and 16 others > note: required by a bound in `parse2::multiplicity::ItemSetMethods::check_item_value_parseable` > --> crates/tor-netdoc/src/parse2/multiplicity.rs:109:59 > | > 109 | fn check_item_value_parseable(self) where Self::Each: ItemValueParseable {} > | ^^^^^^^^^^^^^^^^^^ required by this bound in `ItemSetMethods::check_item_value_parseable` > > error[E0277]: the trait bound `parse2::poc::netstatus::NdiParams: parse2::traits::ItemValueParseable` is not satisfied > --> crates/tor-netdoc/src/parse2/derive.rs:438:34 > | > 438 | let item = ItemValueParseable::from_unparsed(item)?; > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `parse2::traits::ItemValueParseable` is not implemented for `parse2::poc::netstatus::NdiParams` > | > ::: crates/tor-netdoc/src/parse2/poc/netstatus/flavoured.rs:27:10 > | > 27 | #[derive(Deftly, Clone, Debug)] > | ------ in this derive macro expansion > | > = help: the following other types implement trait `parse2::traits::ItemValueParseable`: > () > (T0, T1) > (T0, T1, T2) > (T0, T1, T2, T3) > (T0, T1, T2, T3, T4) > (T0, T1, T2, T3, T4, T5) > (T0, T1, T2, T3, T4, T5, T6) > (T0, T1, T2, T3, T4, T5, T6, T7) > and 16 others > = note: this error originates in the macro `derive_deftly_template_NetdocParseable` which comes from the expansion of the derive macro `Deftly` (in Nightly builds, run with -Z macro-backtrace for more info) | ||||
| * | tor-netdoc: multiplicity: Introduce can_accumulate | Ian Jackson | 2025-09-02 | 1 | -2/+20 |
| | | | | | | | We're going to use this to check that we can accept a sub-document before we parse it. That will make the error come out in the right place. | ||||
| * | tor-netdoc: parse2: multiplicity: Remove now-obsolete trait items | Ian Jackson | 2025-08-26 | 1 | -12/+0 |
| | | |||||
| * | tor-netdoc: parse2: Know that we always accumulate into Option<Field> | Ian Jackson | 2025-08-26 | 1 | -1/+1 |
| | | |||||
| * | tor-netdoc: parse2: Always accumulate into Option<Field> (fmt) | Ian Jackson | 2025-08-26 | 1 | -1/+5 |
| | | |||||
| * | tor-netdoc: parse2: Always accumulate into Option<Field> | Ian Jackson | 2025-08-26 | 1 | -13/+22 |
| | | |||||
| * | tor-netdoc: parse2: Report subdoc intro item keyword for missing item | Ian Jackson | 2025-08-26 | 1 | -0/+10 |
| | | | | | This corrects the error message. | ||||
| * | tor-netdoc: Introduce parse2, new parser | Ian Jackson | 2025-08-14 | 1 | -0/+196 |
| This isn't used anywhere yet. We're going to demonstrate it, and test the demo, in a moment. | |||||
