summaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/encode
Commit message (Collapse)AuthorAgeFilesLines
* tor-netdoc: Implement encode traits for Intern wrappersClara Engler2026-06-241-0/+35
| | | | Just a boilerplate implementation.
* tor-netdoc: encode derive: New default(skip) featureIan Jackson2026-06-222-0/+31
| | | | This lets us skip fields which have the default values.
* tor-netdoc: encode derive: New default(skip) feature (pre-fmt)Ian Jackson2026-06-221-3/+7
|
* tor-netdoc: Document that parse2 vs encode multiplicity match req'tIan Jackson2026-05-181-0/+20
|
* tor-netdoc: NetdocEncodableFields: Suppress warnings for empty structsIan Jackson2026-05-131-0/+2
|
* tor-netdoc: NetdocEncodableFields: Suppress warnings for empty structs (pre-fmt)Ian Jackson2026-05-131-1/+4
|
* tor-netdoc: Introduce RetainedOrderVec parse/encode typeIan Jackson2026-04-231-0/+8
|
* tor-netdoc: Better error message for failure to implement encoding traitIan Jackson2026-04-231-1/+1
|
* tor-netdoc: impl ItemValueEncodable for tor_protover::ProtocolsIan Jackson2026-04-211-0/+13
|
* tor-netdoc: Implement encoding traits for Arc<T>Ian Jackson2026-04-211-0/+33
|
* tor-netdoc: Support `#[deftly(netdoc(skip))]` in itemsIan Jackson2026-04-201-0/+6
| | | | Ie for "arguments" that don't actually appear.
* Merge branch 'netdoc-fixes' into 'main'Clara Engler2026-04-081-1/+1
|\ | | | | | | | | tor-netdoc: Three fixes to parsing and encoding See merge request tpo/core/arti!3862
| * tor-netdoc: encoding: Fix a Result to be $P::ResultIan Jackson2026-04-071-1/+1
| |
* | tor-netdoc: parse2/encode derive: Show unquoted attributes in the docsIan Jackson2026-04-071-3/+3
| |
* | tor-netdoc: parse2/encode derive: Use meta_quoted rigorousIan Jackson2026-04-071-4/+4
|/ | | | | | | | | | | The `doctype_for_error` attribute needs immediate adjustment, because a string expression value is expected. With `quoted retain`, that would be re-interpreted, silently. This kind of thing is why `quoted rigorous` exists. So change its docs and the one use site. The macros' docs, and the other calls ites, we'll deal with shortly.
* tor-netdoc: encode: Move various ItemArgument impls to impls.rsIan Jackson2026-04-011-1/+68
|
* tor-netdoc: impl encoding traits for rsa::PublicKeyIan Jackson2026-04-011-0/+27
|
* tor-netdoc: Provide ItemEncoder::object() taking an ItemObjectEncodableIan Jackson2026-04-011-0/+4
|
* tor-netdoc: encode derive: Fix handling of optionality.Ian Jackson2026-04-011-7/+3
| | | | | We mustn't use selector.selector() because that's for multiplicity, not optionality. In pracctice, it goes wrong with Vec<u8>.
* tor-netdoc: encode derive: Use paste_spanned to improve an error messageIan Jackson2026-04-011-1/+3
|
* tor-netdoc: Fix a wrong "what does this end" commentIan Jackson2026-04-011-1/+1
| | | | This was a c&p error, I think.
* tor-netdoc: encode derive: Use $P for ResultIan Jackson2026-03-311-1/+1
|
* tor-netdoc: encoder: Rename .object() method to .object_bytesIan Jackson2026-03-311-1/+1
| | | | | | | | | | | With the introduction of the derives for document encoding, we now have a trait ItemObjectEncodable. We will want a method on ItemEncoder that takes an ItemObjectEncodable, and that should be called `object` since it's a better approach than working ad-hoc with tor_bytes::Writeable. (For example, an ItemObjectEncodable knows its own label.) So, rename `object` to `object_bytes`.
* Fix typosTobias Stoeckmann2026-03-242-3/+3
| | | | Typos found with codespell
* tor-netdoc: parse2: Move hash out of signature itemsIan Jackson2026-03-191-5/+0
| | | | | | | | | | 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: Fix typoIan Jackson2026-01-141-1/+1
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3571#note_3325449
* tor-netdoc: derives: New `skip` document field optionIan Jackson2026-01-141-0/+7
| | | | | This lets us having document items that are "manually non exhaustive" which is necessary for struct literal constructors.
* tor-netdoc encode: Fix typos in multiplicity check method docsIan Jackson2025-12-101-4/+4
|
* tor-netdoc encode: Enhance explanation of DeterminedMultiplicitySelectorIan Jackson2025-12-101-0/+3
|
* tor-netdoc encode multiplicity: Fix wrong trait refIan Jackson2025-12-101-1/+1
|
* tor-netdoc encode multiplicity: Add a note about omission of intro itemsIan Jackson2025-12-101-1/+1
|
* tor-netdoc Linkify three more typesIan Jackson2025-12-101-1/+1
|
* tor-netdoc Fix docs typoIan Jackson2025-12-101-1/+1
|
* tor-netdoc: derive netdoc encoding traitsIan Jackson2025-12-102-0/+476
| | | | | Signature encoding is not yet supported. We need to consider how this will work.
* tor-netdoc: encoding: Provide multiplicity moduleIan Jackson2025-12-101-0/+196
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.