summaryrefslogtreecommitdiff
path: root/crates/tor-rpcbase
Commit message (Collapse)AuthorAgeFilesLines
* Increment crate versions.Nick Mathewson2023-05-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of the errorkind bumps, we're calling this a breaking change in everything lower-level than `arti`. Generated with: ``` cargo set-version -p tor-basic-utils --bump minor cargo set-version -p tor-async-utils --bump minor cargo set-version -p caret --bump minor cargo set-version -p fs-mistrust --bump minor cargo set-version -p safelog --bump minor cargo set-version -p retry-error --bump minor cargo set-version -p tor-error --bump minor cargo set-version -p tor-config --bump minor cargo set-version -p tor-events --bump minor cargo set-version -p tor-units --bump minor cargo set-version -p tor-rtcompat --bump minor cargo set-version -p tor-rtmock --bump minor cargo set-version -p tor-rpcbase --bump minor cargo set-version -p tor-llcrypto --bump minor cargo set-version -p tor-protover --bump minor cargo set-version -p tor-bytes --bump minor cargo set-version -p tor-hscrypto --bump minor cargo set-version -p tor-socksproto --bump minor cargo set-version -p tor-checkable --bump minor cargo set-version -p tor-cert --bump minor cargo set-version -p tor-linkspec --bump minor cargo set-version -p tor-cell --bump minor cargo set-version -p tor-proto --bump minor cargo set-version -p tor-netdoc --bump minor cargo set-version -p tor-consdiff --bump minor cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-congestion --bump minor cargo set-version -p tor-persist --bump minor cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-ptmgr --bump minor cargo set-version -p tor-guardmgr --bump minor cargo set-version -p tor-circmgr --bump minor cargo set-version -p tor-dirclient --bump minor cargo set-version -p tor-dirmgr --bump minor cargo set-version -p tor-hsclient --bump minor cargo set-version -p tor-hsservice --bump minor cargo set-version -p arti-client --bump minor cargo set-version -p arti-rpcserver --bump minor cargo set-version -p arti-config --bump minor cargo set-version -p arti-hyper --bump minor cargo set-version -p arti --bump patch cargo set-version -p arti-bench --bump patch cargo set-version -p arti-testing --bump patch ```
* RPC: Log all internal errors.Nick Mathewson2023-04-191-3/+7
|
* rpc: Simplify and clarify SendUpdateError.Nick Mathewson2023-04-191-7/+13
|
* Arti: Add ability to remember the list of methods names.Nick Mathewson2023-04-192-2/+39
| | | | | | | | | | | | 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: New syntax for method declarationNick Mathewson2023-04-191-9/+46
| | | | | Now you just declare your function `my_func` with the right types, and invoke `rpc_invoke_fn!{ my_func(ObjType, MethodType); }`
* rpc: impl From<SendUpdateError> for RpcError.Nick Mathewson2023-04-191-0/+14
|
* rpcbase: Use with_fn.Nick Mathewson2023-04-193-8/+14
|
* rpc: Minor tweaks to get a sink to compile.Nick Mathewson2023-04-191-4/+5
|
* rpc: Use Method types to determine type of method outputs, updates.Nick Mathewson2023-04-191-64/+103
| | | | This lets us do much less in our rpc_invoke_fn functions.
* rpc: Split Method into DynMethod and MethodNick Mathewson2023-04-193-23/+60
| | | | | Now `Method` has an Output and Update associated type, and `decl_method` can do a little more.
* rpc: simplify API by always providing a sink.Nick Mathewson2023-04-161-19/+12
| | | | | Previously we have two places where we had to do "make a `Drain` sink if updates aren't wanted"; now there's only one.
* rpc: Wire updates into rpc invoke functions again.Nick Mathewson2023-04-161-12/+43
| | | | | | | | Now that the sink is not part of the context, RPC functions that are able to send an update have to declare an `impl Sink` as their fourth argument. This syntax is not final. Part of #824.
* rpc: Move update sink out of context.Nick Mathewson2023-04-162-46/+26
| | | | | Now the update sink is its own boxed object. It is not yet passed to the invoke functions that want it.
* rpc, spec: Document current ObjectError, RequestError behavior as correct.Nick Mathewson2023-04-131-10/+2
|
* rpcbase: Use correct error codes, and add tests.Nick Mathewson2023-04-122-7/+183
| | | | | | | | | | | Well, mostly correct. Our current serde implementation doesn't tell us much about what went wrong with the object, so we can't tell why we couldn't convert it into a Request. Also, our output for the data field is not as the spec says: we should bring them into conformance. Part of #825.
* tor-rpcbase: Create error kinds properly.Nick Mathewson2023-04-121-14/+16
| | | | | The field is called "kinds", it is a list, and it holds strings beginning with "arti:".
* tor-rpcbase: rename cmd to method everywhere.Nick Mathewson2023-04-121-31/+31
|
* tor-rpcbase: Rename cmd.rs to method.rs.Nick Mathewson2023-04-122-2/+2
|
* tor-rpcbase: Rename and rephrase "command" to "method"Nick Mathewson2023-04-125-47/+47
|
* rpc: Try to fix rustdoc errors.Nick Mathewson2023-04-122-2/+2
|
* rpc: Use empty structs in test code.Nick Mathewson2023-04-121-12/+12
|
* Rename tor-rpccmd to tor-rpcbase.Nick Mathewson2023-04-128-0/+840