aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-rtcompat/src/impls/streamops.rs
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* Allow StreamOps import to be unusedNick Mathewson2025-04-091-0/+1
| | | | | This comes up on OSX; I hadn't seen it before, so I assume it is new with Rust 1.86.
* tor-rtcompat: Fix doc warning.Gabriela Moldovan2025-01-151-1/+1
|
* tor-rtcompat: Add the ability to get a StreamOps handle.Gabriela Moldovan2025-01-151-1/+38
| | | | | | | | | | | | | | | | | | | | | | | Needed for cases where we wrap an object that implements `StreamOps` in an external type, thereby losing access to the `StreamOps` functionality. For example, during the channel handshake, we `.split()` the stream that implements `StreamOps`, which leaves us with a `SplitSink` and a `SplitStream`, neither of which implement `StreamOps`. Getting a handle to the underlying object that implements `StreamOps` (for example, a file handle) *before* the stream is `.split()` enables us to use `StreamOps` to manipulate the underlying split stream. This commit also introduces a special `UnsupportedStreamOpsHandle`, which is a type that implements `StreamOps`, but always returns an error. This type is meant to simplify error handling and usage, and is meant to be used in cases where `StreamOps` is not supported. TODO: the name of this type is pretty confusing (it's very similar to `UnsupportedStreamOp`, which is an error type), and should probably be renamed to something else (`NoOpStreamOpsHandle`, `BrokenStreamOpsHandle`, `DummyStreamOpsHandle` come to mind...). Note: this changes the `StreamOps` trait to be slightly different from what I originally envisioned in !2660 and #1769
* streamops: Resolve unused-variable warnings.Nick Mathewson2024-12-121-1/+1
|
* tor-rtcompat: Replace bad_api_usage with UnsupportedStreamOp (fmt).Gabriela Moldovan2024-12-101-1/+5
|
* tor-rtcompat: Replace bad_api_usage with UnsupportedStreamOp.Gabriela Moldovan2024-12-101-5/+2
|
* tor-rtcompat: Add tests for set_tcp_notsent_lowat.Gabriela Moldovan2024-12-101-0/+60
|
* tor-rtcompat: Implement StreamOps for all the stream types.Gabriela Moldovan2024-12-101-0/+43
Part of #1769