| 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.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The test case documents are often not in canonical form. We don't
want to change them to be in canonical form because we want to test
parsing edge cases. So, we provide a mangling scheme with in-document
notes, and annotate all the documents.
Apply suitable annotations to all the documents.
Test that the encoded forms are as expected.
This reverts commit 05e7b8b60061a7e8a8d004a822cc213d3ea22d47.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Make this whole module conditional on the encode feature.
Apply the derives. Provide the necessary manual implementations for
the types where we use `with`.
|
| | | |
| | |
| | |
| | |
| | | |
Signature encoding is not yet supported. We need to consider how this
will work.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We want to recognise `#[deftly(netdoc(debug))]` because otherwise we
have to make lots of these attributes conditional.
So, implement it for *all* the derives, providing a nugatory debug
statement.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
What is being written to here is StderrLock, not a String.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
While testing I discovered that the `#[deftly(netdoc(debug))]`
feature (which dumps parsing progress to stderr) didn't compile if the
derive was invoked from elsewhere.
|
| | | |
| | |
| | |
| | | |
This makes it possible to use $F_KEYWORD_REPORT within another concat.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Code motion fromk NetdocParseableFields to NetdocFieldsDeriveCommon.
This uses the derive-deftly imported doc comment feature.
|
| | | |
| | |
| | |
| | | |
Code motion from NetdocParseable to NetdocEntireDeriveCommon.
|
| | | |
| | |
| | |
| | | |
Code motion from ItemValueParseable to NetdocItemDeriveCommon.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Code motion from NetdocParseable to NetdocEntireDeriveCommon.
Code motion from NetdocParseableFields to NetdocFieldsDeriveCommon.
Again, the encoder wants exactly this logic.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Code motion from NetdocSomeItemsParseableCommon to
NetdocSomeItemsDeriveCommon.
Encoding wants exactly the same logic.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
There is nothing actually in any of these yet. But it is most
convenient to lay out the structure now.
We'll move code into these modules in forthcoming commits.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is only used for structs which contain items, not item value
structs.
We need a name that reflects this, especially as we are going to add a
bunch more modules full of common macro elements.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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.
|