| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
I feel that before merging all this, I ought at least to demonstrate
that it can be applied to at least one real type!
We can unconditionally `#[derive(Deftly)]`. That is simpler, and
harmless if no actual deftly derives are applied.
|
| |
|
|
|
|
|
|
|
| |
Fixes part of #2193.
(Edits from nickm: I selected the cases here that I could verify
were correct from immediate context.)
Edited-by: Nick Mathewson <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
This commit implements directory authority certificates using the
`parse2` approaches.
For now, those are in a module `doc::authcert::tmp`, with the eventual
goal of moving it into its super module after removing/deprecating the
legacy types.
|
| |\
| |
| |
| |
| | |
Make Protocols type inherently interned; add notes about usage.
See merge request tpo/core/arti!3524
|
| | |
| |
| |
| | |
(It's now done in tor_protover.)
|
| | | |
|
| | | |
|
| |/
|
|
|
|
|
| |
Previously, this value was stored in a u16. However, because this
number is usually always derived from some sort of list type, such as
`Vec`, it makes more sense to use usize for this, as it avoid
unnecessary casting and error checking.
|
| | |
|
| |
|
|
| |
This silences a new warning on nightly.
|
| |
|
|
|
|
|
| |
tor_bytes also has a write_onto method. And types (especially utility
types like `Ignored`) might conceivably implement both!
No need for semver update since this was pub(crate) in the previous release.
|
| |
|
|
|
|
|
| |
Since we expose the relay_flags module, it makes sense to give this a
shorter name.
(It had a longer name when it was part of the netstatus module.)
|
| |
|
|
| |
The generic parser type is easy enough to name now.
|
| |\
| |
| |
| |
| |
| |
| | |
tor-llcrypto: Stop deriving Deref in CtByteArray
Closes #2172
See merge request tpo/core/arti!3432
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | | |
tor-netdoc: Make much more of encode module public
See merge request tpo/core/arti!3471
|
| | | |
| | |
| | |
| | |
| | | |
My planned encoding derive macro is not going to use `decl_keyword!`
but will need to call `NetdocEncoder::item`.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Abolish the constants with the transitional names.
This also abolishes the controversial name `H_S_DIR`, which Rust case
transformation rules generated from `HSDir`.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We're going to separate RelayFlag from RelayFlags.
We could continue to provide a bunch of constant values for
RelayFlags, for each individual type, but that would involve an ad-hoc
derive, and would still be a bit of an unusual API.
Instead, we're going to make ``RelayFlag` a normal enum.
In this commit, we change everyone to refer to it by its singular
name. Hopefully separating out this bulk change makes both this, and
the core commit, easier to review.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Many call sites pass one flag. We're going to have a type-level
distinction between a single flag and a set. But that's annoying at
many of the call sites which want to specify a fixed single flag.
Note that `set_flags` doesn't only set flags. It replaces them.
|
| |/ /
| |
| |
| |
| |
| |
| |
| | |
Implement this on DocRelayFlags instead, since that's what it returns.
And change the name to from_item_consensus to highlight its semantic
restriction. (It's not generic over the implied flags, so it can only
do one thing.)
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| | |
I would do `#[deprecated]` but empirically that has no effect...
|
| | |
| |
| |
| | |
This will have space for unknown flags.
|
| | |
| |
| |
| |
| | |
Provide a per-variety alias and use it for parsing; no longer impl
ItemValueParseable for RelayFlags.
|
| | |
| |
| |
| |
| | |
Add underscores so that the spec keywords and the flag constants
correspond (according to `paste`'s case-changing rules).
|
| | |
| |
| |
| |
| | |
We're going to do a lot more with this and it's less confusing to have
it all together.
|
| | | |
|
| | |
| |
| |
| |
| | |
The word "build" so often in Rust means builder pattern. This module
contains functions for encoding.
|
| |/
|
|
| |
Run maint/add_warning
|
| | |
|
| | |
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3378#note_3277957
|
| |
|
|
| |
This makes it match the protocol and the spec.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
We should use the same name everywhere, even if the name in the spec
is clumsy (as it is here).
|
| |
|
|
|
|
| |
We're going to want to apply the parse2 derive to Preamble, but this
field is anomalous. Rather than trying to make it regular, simply
move it to the old-parser-specific Consensus struct.
|
| |
|
|
|
|
|
| |
Consensus is not going to be easy to square with parse2 - especially,
signature handling is very different between the two parsers.
Instead, we'll have a new NetworkStatus type.
|
| |
|
|
|
| |
There is no such thing as the "header" according to the spec. We mean
the preamble.
|
| |\
| |
| |
| |
| | |
impl ItemValueParseable for SharedRandStatus
See merge request tpo/core/arti!3380
|
| | | |
|
| | | |
|
| | | |
|