aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge branch 'p2-blanket-arc' into 'main'David Goulet2025-10-212-7/+30
|\ \ | | | | | | | | | | | | tor-netdoc: blanket impl parse2 traits for Arc See merge request tpo/core/arti!3381
| * | tor-netdoc: blanket impl parse2 traits for ArcIan Jackson2025-10-212-7/+30
| |/ | | | | | | This replaces one ad-hoc impl and will avoid having to have any more.
* | tor-netdoc: Lifetime impls: reindentIan Jackson2025-10-211-37/+37
| |
* | tor-netdoc: derive NetdocParseableFields for LifetimeIan Jackson2025-10-211-0/+4
| |
* | tor-netdoc: parse2: Provide documentation for derived Accumulator typesIan Jackson2025-10-211-0/+3
| |
* | tor-netdoc: Lifetime: change type of fieldsIan Jackson2025-10-212-8/+8
| | | | | | | | These fields aren't public so this doesn't have semver impacts.
* | tor-netdoc: Lifetime: derive constructor and accessorsIan Jackson2025-10-211-20/+17
| | | | | | | | | | | | | | | | | | | | | | In a moment, we're going to want to transform the field arguments. That would leave us open to bugs like this: valid_after: valid_after.into(), fresh_until: fresh_until.into(), valid_until: valid_after.into(), We'll sort out the indentation later in this branch.
* | tor-netdoc: Lifetime: Move some documentation to fieldsIan Jackson2025-10-211-10/+10
| | | | | | | | | | This (briefly) regresses the documentation, but it's going to appear again when we derive the methods.
* | tor-netdoc: Lifetime: Construct Lifetime struct earlierIan Jackson2025-10-211-6/+10
|/
* tor-netdoc: Add a lot of spec cross-references and tidy docsIan Jackson2025-10-153-15/+101
| | | | | | | | | | | | | Add links to torspec, and other cross-references. Change heading fof `IgnoredPublicationTimeSp` to `publication` to match spec and distinguish it from the `published` item in netstatus docs. Align several descriptions with the wording from torspec. Remove a restatement of a fact from the spec, on the `valid_until` field in `Lifetime`.
* tor-netdoc: Typo fixes in docsIan Jackson2025-10-152-2/+2
|
* tor-netdoc: tests: Print out vote routerstatusIan Jackson2025-10-151-1/+2
| | | | | | | I have eyeballed the output and it seems to look right. Eventually we'll have encoing code and then we'll be able to check that things round-trip.
* tor-netdoc: tests: Move vote parsing test to netstatus.rsIan Jackson2025-10-152-12/+21
| | | | | This is a test of real document structs now, albeit that it still uses one of the types from `poc`.
* tor-netdoc: tests: Use real `RouterStatus` in `parse2::poc`Ian Jackson2025-10-152-9/+8
| | | | This now exercises all the new parsing code.
* tor-netdoc: impl parse2 for RouterStatus entryIan Jackson2025-10-152-1/+85
|
* tor-netdoc: Type for parsing `m` lines in votesIan Jackson2025-10-152-1/+39
|
* tor-netdoc: Add ConsensusMethod typeIan Jackson2025-10-151-3/+46
|
* tor-netdoc: Add types for hashes with their accompanying alg idIan Jackson2025-10-152-3/+143
|
* tor-netdoc: B64: impl Clone, [ConstantTime]Eq, Display, DebugIan Jackson2025-10-151-0/+27
|
* tor-netdoc: B64 helper type: ExposeIan Jackson2025-10-152-4/+5
|
* tor-netdoc: impl parse2 multiplicity for BTreeSetIan Jackson2025-10-153-3/+36
|
* tor-netdoc: RouterStatus: Add `publication` argument fieldIan Jackson2025-10-156-3/+28
|
* tor-netdoc: Mirror netdoc structure in RouterStatus document digestsIan Jackson2025-10-154-6/+37
| | | | | | | | In md consensuses the referenced document digest is in the `m` field. This seems to be to make it similar to votes. But really the function of the md desc hash in md rs entries is much more parallel to the plain desc hash in plain rs entries. The way the spec has done it means the `r` item has a needlessly different syntax.
* tor-netdoc: Provide doc_digest on vote routerstatus entriesIan Jackson2025-10-152-6/+12
|
* tor-netdoc: RouterStatus: Split out the `r` item's fieldsIan Jackson2025-10-154-27/+61
| | | | | | | | | This makes the Rust structure closer to the document structure. Arguably, this makes the Rust structure worse. But: I'm really very keen on avoiding handwritten parsing and printing code. And, in the longer term, having this linkage will hopefully apply pressure to avoid further protocol complexity/variation/chaos.
* tor-netdoc: impl parse2 for rs::VersionIan Jackson2025-10-151-0/+10
|
* tor-netdoc: impl parse2 for RelayFlagsIan Jackson2025-10-151-0/+13
|
* tor-netdoc: split up RelayFlags parsing (fmt)Ian Jackson2025-10-151-5/+1
|
* tor-netdoc: split up RelayFlags parsingIan Jackson2025-10-151-14/+47
|
* tor-netdoc: impl parse2 traits for RelayWeightIan Jackson2025-10-151-0/+25
|
* tor-netdoc: split up RelayWeight parsing (fmt)Ian Jackson2025-10-151-4/+2
|
* tor-netdoc: split up RelayWeight parsingIan Jackson2025-10-151-2/+9
| | | | We're going to call from_net_params from the parse2 trait impl.
* tor-netdoc: impl parse2 traits for protoversIan Jackson2025-10-153-1/+25
|
* tor-netdoc: Provide convenience method for handling invalid argumentsIan Jackson2025-10-151-0/+14
|
* tor-netdoc: Introduce ArgumentNotPresent placeholder utility typeIan Jackson2025-10-152-3/+22
|
* tor-netdoc: Make Ignored part of a moduleIan Jackson2025-10-151-16/+23
| | | | | The rest of types::misc does this. We should probably follow suit for consistency. Also we're going to want to add soemthing here.
* tor-netdoc: impl Default for IgnoredIan Jackson2025-10-151-1/+1
| | | | | This omission seems like an oversight. I thought I wanted it, but it turns out I don't - but I think it should still be there.
* tor-netdoc: parse2: export NetdocSigned traitIan Jackson2025-10-151-1/+1
| | | | This seems to have been overlooked.
* tor-netdoc: Don't repr(transparent)Ian Jackson2025-10-091-2/+0
| | | | | We don't really need this and it raises questions, for example https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3337#note_3271871
* tor-netdoc: Replace NdaSystemTimeDeprecatedSyntax with Ios8601TimeSpIan Jackson2025-10-091-4/+5
| | | | | Previously we needed this separate type because Ios8601TimeSp is FromStr which prevented a correct ItemArgumentParseable impl.
* tor-netdoc: Expose the field in time wrappersIan Jackson2025-10-091-2/+4
|
* tor-netdoc: impl many traits for time wrappersIan Jackson2025-10-091-2/+4
|
* tor-netdoc: Expose Iso8601TimeNoSp and Iso8601TimeSp utility wrappersIan Jackson2025-10-092-3/+7
| | | | We're going to want to change some now-public fields to use these types.
* tor-netdoc: parse2: Fix some slips in doc commentsIan Jackson2025-10-091-3/+3
|
* tor-netdoc: parse2: Work around MSRV unhelpful lifetimeIan Jackson2025-10-091-2/+6
| | | | | | | | | | 1.85.1 rejects this, because it doesn't extend the lifetime of the `format_args!`. 1.90 is fine with it. I want to keep `format!` not `String::new()` so that it's easy to change back. That means a clippy allow. Getting that to apply to the code inside the derive is tricky, so I've enabled it for the whole module. (IMO this clippy lint is pretty annoying anyway.)
* tor-netdoc: parse2: Actually expose new errors in crate toplevelIan Jackson2025-10-091-1/+1
|
* tor-netdoc: parse2 tests: Test ParseError Display and Error implIan Jackson2025-10-091-6/+29
|
* tor-netdoc: parse2 tests: Have t_err_* return the errorIan Jackson2025-10-091-5/+4
|
* tor-netdoc: parse2 tests: Have t_err_* return the error (pre-fmt)Ian Jackson2025-10-091-1/+6
|
* tor-netdoc: parse2 tests: Check columnsIan Jackson2025-10-091-7/+15
|