aboutsummaryrefslogtreecommitdiff
path: root/crates/arti-rpcserver/src/msgs.rs
Commit message (Collapse)AuthorAgeFilesLines
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Fix typosDimitris Apostolou2023-07-221-1/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* Arti: Add ability to remember the list of methods names.Nick Mathewson2023-04-191-1/+5
| | | | | | | | | | | | Right now, this lets us say whether the method was unrecognized or whether the parameter type was incorrect. We'll use this to enforce correct method names later on. (I have to add another `inventory` here, since the `typetag` maintainer does not want to expose this functionality: see https://github.com/dtolnay/typetag/issues/57#issuecomment-1506106290 )
* rpc: Split Method into DynMethod and MethodNick Mathewson2023-04-191-12/+15
| | | | | Now `Method` has an Output and Update associated type, and `decl_method` can do a little more.
* rpc: Change `id=<SYNTAX>` to "no id".Nick Mathewson2023-04-131-6/+21
| | | | | | | Now instead of hoping that buggy clients will detect a magic `id`, we can simply tell them that they will get no `id` at all. If they can't handle that case, no major harm is done: the connection will get closed anyway.
* rpc: Require that errors are RpcError.Nick Mathewson2023-04-131-4/+2
| | | | | | Since we're serializing everything in this format, let's enforce it. With this change, we can no longer cram arbitrary junk into an RPC error, so we have to clean up our handling of cancelled requests.
* rpc: Improve error reporting for invalid requestsNick Mathewson2023-04-121-1/+93
| | | | | | | | | | | | | | | | This is a bit big, but it's not that _complicated_. The idea here is that we use serde's "untagged" enum facility when parsing our `Request`s, such that if parsing as a `Request` fails, we parse as an `InvalidRequest` and try to report what the problem was exactly. This lets us determine the ID of a request (if it had one), so we can report that ID in our error message. We can also recover from a much broader variety of errors. We now also conform with the spec reporting errors about completely wrong json, requests without IDs, and so on.
* arti-rpcserver: Be careful about saying "result".Nick Mathewson2023-04-121-5/+10
| | | | | | Even though json-rpc uses "result" to mean "a successful return value from a method", we can't: Rust's `Result` type is so pervasive that confusion would be inevitable.
* arti-rpcserver: rename command to method.Nick Mathewson2023-04-121-8/+8
|
* tor-rpcbase: Rename and rephrase "command" to "method"Nick Mathewson2023-04-121-3/+3
|
* Rename tor-rpccmd to tor-rpcbase.Nick Mathewson2023-04-121-2/+2
|
* rpc: Rename BoxedResponseBody => ResponseBodyNick Mathewson2023-04-121-10/+10
|
* rpc: Add standard warnings to arti-rpcserverNick Mathewson2023-04-121-2/+3
|
* rpc: Wire up arti-rpcserver to use tor-rpccmd.Nick Mathewson2023-04-121-0/+6
|
* rpc: do a better job of hiding impl_const_type_id!Nick Mathewson2023-04-121-1/+2
|
* RPC: Initial implementation of a multiple-argument dispatchNick Mathewson2023-04-121-0/+1
| | | | | | | | | | This code uses some kludges (discussed with Ian previously and hopefully well documented here) to get a type-identifier for each type in a const context. It then defines a macro to declare a type-erased versions of a concrete implementation functions, and register those implementations to be called later. We will probably want to tweak a bunch of this code as we move ahead.
* Start on a lower-level tor-rpccmd crate.Nick Mathewson2023-04-121-35/+10
| | | | | This crate will hold the backend pieces of RPC interaction that different parts of Arti get to implement.
* rpc: Implement json message types for serde.Nick Mathewson2023-04-121-0/+214