| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Now we use all the imports. We're still adding much code, though.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This is a bit subtle. Ignored is used where we want to see and accept
a value (for example, an Item or an Object), but we don't want to emit
it.
Update the docs and implement the various traits. We need an
uninhabited helper type which implements ItemValueEncodable and
ItemObjectEncodable but *not* ItemArgument. That prevents the use of
Ignored for an argument, which would be wrong because what would we
emit to keep the argument parser in step?
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Per the type-level docs for NotPresent: it's is a placeholder type
mostly used when the document variety doesn't have this field.
When encoding it, we emit nothing.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
And implement them for Void and tuples, as applicable.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Adding these all at the beginning helped me with churn in this branch.
The allow(unused) will go away again shortly.
|
| | |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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-dirserver: Implement download functionality
See merge request tpo/core/arti!3434
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This commit replaces `AuthorityCommunicationError::IO` with
`AuthorityCommunicationError::TcpConnect` while removing the respective
`From<std::io::Error>` implementation, mostly because an IO error is way
too generic and in our case, it would only occurr with a failed TCP
connection.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This commit removes the unused `Votable` and `Uploadable` traits and
changes the `Downloadable` trait to depend on `Requestable` rather the
sealed type, as it achieves the same level of sealedness while clearly
communicating the hierarchy.
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This commit implements the DownloadManager in its own module, an object
responsible for downloading network documents from an upstream directory
authority.
Further motivation for this can be found in the rustdoc comment of the
respectively introduced type.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This commit introduces three new traits to `tor-dirclient`:
* `Downloadable`
* `Uploadable`
* `Votable`
All of these traits have no associated methods or constants and all
require an existing implementation of `Requestable`.
The idea behind this is for applications to accept generic arguments
based upon the semantic meaning, allowing for a better integration with
proposal330.
|
| |/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit improves upon the error logging of the `tor-dirclient` crate
in order to not just log the location/source of an error but also the
actual reason of an error.
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
arti-relay: Advertise config fields are now lists
See merge request tpo/core/arti!3538
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Example:
```toml
[relay.advertise]
ipv4 = []
ipv6 = ["[10::]:10"]
```
```text
Error: Failed to resolve configuration
[...]
The list is empty for key "default.relay.advertise.ipv4" in [...]
```
|
| |\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Implement derive_deftly(TorConfig)
Closes #1704
See merge request tpo/core/arti!3513
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This reverts commit c7c8eb5a03439ce31319389183e64cb0db539fc9.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
(We could tighten this up even more by inlining some of the default
values.)
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This template is meant to replace most of our use of derive_builder
for configuration objects. Where possible and reasonable, it
delegates to existing macros, and automatically infers what special
patterns we use for individual types. In other cases, it uses
compile-time errors to inform the caller about pattern violations.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This trait will be implemented by every type that our
derive_deftly(TorConfig) template generates. It will, among other
things, help us figure out the Builder type for a given config type
in cases where string-pasting magic is intractable, or where we
want to use assert_not_impl to double-check the attributes.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The derive-deftly TorConfig template will use these as appropriate
for the inputs to setter functions, based on field types.
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
If we don't do this, then any attempt to use it from a derive-deftly
template will cause a warning about referring to it as
$crate::macroname.
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
derive_deftly wants to expand types before passing them to
macro_rules macros, which is quite reasonable. But map_builder
wants its input collection type to be an `ident`, not a `path`.
(And macro_rules doesn't accept `path` before a `<`.)
To fix this, we're providing an alternative syntax for map_builder,
where the inputs are the map type and the builder map type.
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| |/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We were only using it for Default, and it is easier to implement
Default by hand than it is to keep this particular layer in our
leaning tower of macros.
|
| |\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
proto: Fix relay/hs-service feature gating
See merge request tpo/core/arti!3534
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We now have add_ent_with_id(), so we can just remove the TODO.
|
| | | | | | | | |
|
| | | |_|_|/ /
| |/| | | |
| | | | | |
| | | | | |
| | | | | | |
Without this, `tor-proto` doesn't compile if you enable the `relay`
feature but not `hs-service`.
|
| |\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
check_licenses: Update comment about priority-queue
See merge request tpo/core/arti!3509
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Technically `priority-queue` belongs in the `MPL_20_OK` list, but our
current checks are too rudimentary to be able to handle the `OR` (we
*do* split on `OR` for one of the checks, but we only compare the
resulting licenses against `RECOGNIZED_LICENSES`, not `MPL_20_OK`). So
for now, let's retain the exception for `priority-queue`.
(We could expand the logic in the branch handling the `OR'`d licenses to
fix this issue, but the result would be quite fragile; and besides, I
think we're going to eventually want to replace this with a proper
license parser).
|
| |/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
They have in fact added the MPL "Exhibit A" text to every file in the
crate.
The license is still LGPL-3.0-or-later OR MPL-2.0, so the rest of the
comment still applies.
See
https://github.com/garro95/priority-queue/pull/54/commits/e2f90b0811c252f80165bbdb19233464289e428f
|
| |\ \ \ \ \ \
| |_|/ / / /
|/| | | | |
| | | | | |
| | | | | | |
tor-memquota: fix builds for 32-bit platforms
See merge request tpo/core/arti!3532
|
| |/ / / / /
| | | | |
| | | | |
| | | | |
| | | | | |
Multiplying 8 * GIB overflows the usize limit (4 GIB - 1) on 32-bit
platforms. So handle this properly for 32-bit platforms
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
maint: Fix 'extract-md-links' to work with mistune 3.1.3
See merge request tpo/core/arti!3517
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is to make `update-md-links --check CHANGELOG.md` pass.
|