aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-cell/src/err.rs
Commit message (Collapse)AuthorAgeFilesLines
* proto: Make the OutboundClientHandshake use new cell handlerDavid Goulet2025-08-201-1/+1
| | | | | | | | | | | | | | | | | Use the ChannelFrame<> for the entirety of the outbound client handshake that is the ClientInitiator channel type. With this change, the codec.rs code is not needed anymore along its CodecError as well which has been normalized onto the crate::Error instead in order to simplify error handling and avoid duplication of error types. Unit tests have been modified to reflect this change of what can be done with a channel frame. Also renamed to focus on client behavior. Part of #1597 Signed-off-by: David Goulet <[email protected]>
* tor-cell: No longer treat certain tor-bytes errors as EK::InternalIan Jackson2024-09-111-5/+0
| | | | | | | | | I don't see a justification for this. Rather than updating this code for the new distinction between what is going to be Incomplete (ie, our buffer didn't contain enough data and we want to read more) and MissingData, I think we can just do away with it. Perhaps in the future, tor_bytes::Error would implement HasKind.
* tor-bytes: Add a deficit field to Error::TruncatedIan Jackson2024-09-101-1/+1
| | | | This will allow us to fix #1592, but it doesn't do so yet.
* proto: Convert MsgHandler API to expect a message, not a cell.Nick Mathewson2023-06-121-0/+4
| | | | Closes #887.
* tor-cell: Make encoding method signatures fallible.Nick Mathewson2022-07-111-0/+7
|
* tor-cell: convert BytesErr to a struct variantNick Mathewson2022-06-221-4/+13
|
* tor-cell: error usefulness and style fixesNick Mathewson2022-06-221-9/+9
|
* Do not include error source() in display() format.Nick Mathewson2022-06-211-3/+3
| | | | | | | | | According to doc/Errors.md, and in keeping with current best practices, we should not include display an error's `source()` as part of that error's display method. Instead, we should let the caller decide to call source() and display that error in turn. Part of #323.
* Update tor-cell errors to latest APINick Mathewson2022-02-151-4/+4
|
* tor-cell: provide HasKind.Nick Mathewson2022-02-151-8/+15
| | | | | | | | | Additionally, refactor the IoError out of tor_cell::Error: nothing in TorCell created this; it was only used by tor_proto. This required refactoring in tor_proto to use a new error type. Here I decided to use a new CodecError for now, though we may refactor that away soon too.
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+38
This will cause some pain for now, but now is really the best time to do this kind of thing.