summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | tor-proto: replaced error type of `Sender::send_and_wake`Steven Engler2024-12-101-6/+10
| |
* | tor-proto: add some (disabled) doc testsSteven Engler2024-12-101-0/+27
| |
* | tor-proto: moved `Shared::count_wakers` into 'test' modSteven Engler2024-12-101-13/+12
| |
* | tor-proto: changed an `expect` to a `debug_assert`Steven Engler2024-12-101-5/+4
| |
* | tor-proto: use thiserror for `SenderDropped`Steven Engler2024-12-101-9/+2
| |
* | tor-proto: use `ready!` instead of `match`Steven Engler2024-12-101-5/+3
| |
* | tor-proto: `borrowed()` now explicitly returns a `BorrowedReceiverFuture`Steven Engler2024-12-101-3/+2
| |
* | tor-proto: improve commentsSteven Engler2024-12-101-15/+31
| |
* | Revert "tor-proto: implement `FusedFuture` for receiver futures"Steven Engler2024-12-101-57/+10
| | | | | | | | This reverts commit d73f8894551d37e3bc36947eccf0c6007ffc066e.
* | tor-proto: implement `FusedFuture` for receiver futuresSteven Engler2024-12-101-10/+57
| |
* | Revert "tor-proto: deduplicate future fields into `FutureState`"Steven Engler2024-12-101-18/+11
| | | | | | | | This reverts commit acc79ffb44343e52ecb72e27ee8843a63448ff5a.
* | Revert "tor-proto: implement `FusedFuture` for receiver futures"Steven Engler2024-12-101-79/+33
| | | | | | | | This reverts commit 2fd105b79c25d919e32e53daf81cb369d1e44331.
* | tor-proto: implement `FusedFuture` for receiver futuresSteven Engler2024-12-101-33/+79
| | | | | | | | | | | | | | | | I considered just using `FutureExt::fuse`, but that becomes a little annoying since the future type is exposed through `IntoFuture::IntoFuture`, which means `ReceiverFuture` would need to wrap a `Fuse`. I figured it's cleaner just to implement the trait directly.
* | tor-proto: deduplicate future fields into `FutureState`Steven Engler2024-12-101-11/+18
| |
* | tor-proto: renamed `ReceiverBorrowedFuture` to `BorrowedReceiverFuture`Steven Engler2024-12-101-5/+5
| |
* | tor-proto: renamed `ReceiverOwnedFuture` to `ReceiverFuture`Steven Engler2024-12-101-6/+6
| |
* | tor-proto: rename `Receiver::recv` to `borrowed`Steven Engler2024-12-101-24/+24
| |
* | tor-proto: moved the `Weak::upgrade` into `Sender::send_and_wake`Steven Engler2024-12-101-22/+15
| |
* | tor-proto: changed `wakers` from an `Option<_>` to a `Result<_, ↵Steven Engler2024-12-101-9/+21
| | | | | | | | WakersAlreadyWoken>`
* | tor-proto: added `use std::ops::Drop`Steven Engler2024-12-101-3/+4
| |
* | tor-proto: removed `Receiver::recv_clone` and implemented `IntoFuture` for ↵Steven Engler2024-12-102-25/+24
| | | | | | | | `Receiver`
* | tor-proto: renamed `CancelledError` to `SenderDropped`Steven Engler2024-12-101-17/+17
| |
* | tor-proto: switched from `Slab` to `DenseSlotMap` for waker mapSteven Engler2024-12-102-11/+13
| |
* | tor-proto: change the message type from `Option<T>` to `Result<T, ↵Steven Engler2024-12-101-9/+12
| | | | | | | | CancelledError>`
* | tor-proto: changed regular comments on `Shared` to doc commentsSteven Engler2024-12-101-21/+21
| |
* | tor-proto: update docs on `Channel::reactor_closed_rx`Steven Engler2024-12-101-3/+1
| | | | | | | | | | This is no longer applicable with the new oneshot broadcast channel design.
* | tor-proto: replace oneshot broadcast channelSteven Engler2024-12-103-138/+563
| | | | | | | | | | The old version had some issues, so this is a rewrite which uses slightly lower level synchronization types (`Mutex` and `OnceLock`).
* | tor-proto: replace `Channel`s "closed" state handlingSteven Engler2024-12-102-35/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously `Channel` had two concepts of "closed". There was an atomic flag that was set to `true` at the end `Reactor::run`, and an experimental oneshot channel where the sender was dropped when the reactor was dropped. This commit consolidates these two using the `oneshot_broadcast` module. This means that the behaviour is consistent between both "closed" statuses (`is_closing()` and `wait_for_close()`). A channel is considered closed when its reactor is dropped. This also helps progress towards making the channel reactor cancellation safe (see arti#1756).
* | tor-proto: move `ChannelDetails::reactor_closed_rx` to `Channel`Steven Engler2024-12-101-11/+17
| | | | | | | | This doesn't need to be shared with the reactor.
* | tor-proto: add 'oneshot_broadcast' util moduleSteven Engler2024-12-102-0/+246
| |
* | tor-key-forge: Abolish the HasKind impl of Error.Gabriela Moldovan2024-12-102-14/+1
| | | | | | | | | | | | | | We can't possibly know the `ErrorKind` of such an error, unless we know where the unsupported key came from. Since we can't know this, we should let a higher level crate (like `tor-keymgr`) decide the `ErrorKind` instead.
* | tor-rtcompat: Replace bad_api_usage with UnsupportedStreamOp (fmt).Gabriela Moldovan2024-12-104-6/+21
| |
* | tor-rtcompat: Replace bad_api_usage with UnsupportedStreamOp.Gabriela Moldovan2024-12-105-30/+15
| |
* | tor-rtcompat: Add an error type for unsupported StreamOps.Gabriela Moldovan2024-12-102-1/+28
| |
* | tor-rtcompat: Add a default implementation for StreamOps::set_tcp_notsent_lowat.Gabriela Moldovan2024-12-101-2/+8
| |
* | tor-rtcompat: Clarify the StreamOps documentation.Gabriela Moldovan2024-12-101-4/+6
| | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2660#note_3139562
* | tor-rtcompat: Require NetStream{Listener,Provider} streams to impl StreamOps ↵Gabriela Moldovan2024-12-101-2/+6
| | | | | | | | (fmt).
* | tor-rtcompat: Require NetStream{Listener,Provider} streams to impl StreamOps.Gabriela Moldovan2024-12-104-8/+14
| | | | | | | | Part of #1769
* | 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-1010-8/+132
| | | | | | | | Part of #1769
* | tor-rtcompat: Add a StreamOps trait.Gabriela Moldovan2024-12-102-1/+11
|/ | | | | | | | This trait will provide additional operations on `Stream`s. For now, the only supported operation is `set_tcp_notsent_lowat` (needed for #1728). Part of #1769
* Remove needless cbindgen item.Nick Mathewson2024-12-092-1/+1
|
* rpc-client: Reject relative paths.Nick Mathewson2024-12-093-1/+11
|
* rpc-client: split paths better on windows.Nick Mathewson2024-12-091-1/+12
|
* rpc-client: Add TODOs about links to connect point docsNick Mathewson2024-12-091-0/+6
|
* rpc-client: Rename PathEntry to SearchEntry.Nick Mathewson2024-12-091-18/+18
|
* rpc-client: Clarity and consistency in envvar docsNick Mathewson2024-12-091-10/+20
|
* connpt: note an opportunity to save some fds.Nick Mathewson2024-12-091-0/+3
|
* connpt: use cfg-if to declare connect point defaults.Nick Mathewson2024-12-092-20/+28
|
* artilib: Revise C and Python APIs for builders.Nick Mathewson2024-12-096-40/+231
| | | | | | | | | | | | | | | Expose ArtiRpcConnBuilder and appropriate C wrapper functions in our FFI code, and wrap those functions in our python wrapper. This breaks the old C API, but that's allowed since the API is still experimental. Some design decisions: * I've wrapped the builder in a Mutex, so that we can continue our FFI rule that we do not require non-Rust code to wrap `&mut`. * I've removed the non-builder connect() function from the C API as extraneous. * I've made a single function to prepend elements to the search path.