<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-rtcompat/src/traits.rs, branch arti-v1.4.1</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.4.1</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.4.1'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2025-01-15T13:49:17Z</updated>
<entry>
<title>tor-rtcompat: Rename UnsupportedStreamOps to NoOpStreamOpsHandle.</title>
<updated>2025-01-15T13:49:17Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2025-01-13T11:48:16Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=4ec53ca4dea324c2c170885d8556a67c802e491d'/>
<id>urn:sha1:4ec53ca4dea324c2c170885d8556a67c802e491d</id>
<content type='text'>
This renames UnsupportedStreamOpsHandle to NoOpStreamOpsHandle for
clarity (the old name kind of sounded like the name of an error type).
</content>
</entry>
<entry>
<title>tor-rtcompat: Big invasive change adding StreamOps bound everywhere.</title>
<updated>2025-01-15T13:49:17Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2025-01-08T19:08:57Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=f04709c16d0ebf039779c404cf0c907f13965852'/>
<id>urn:sha1:f04709c16d0ebf039779c404cf0c907f13965852</id>
<content type='text'>
This is unfortunately necessary, because after the channel handshake, we
need to give the channel reactor a `StreamOps` handle to the underlying
stream.
</content>
</entry>
<entry>
<title>tor-rtcompat: Implement StreamOps for Framed.</title>
<updated>2025-01-15T13:49:17Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2025-01-08T11:15:12Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=0f0bf7f68183608f27ef67b90a81b5687a3f7a35'/>
<id>urn:sha1:0f0bf7f68183608f27ef67b90a81b5687a3f7a35</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-rtcompat: Add the ability to get a StreamOps handle.</title>
<updated>2025-01-15T13:49:17Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2025-01-08T11:06:59Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=267235969df65d975b5deb01c342e1073d4c3847'/>
<id>urn:sha1:267235969df65d975b5deb01c342e1073d4c3847</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>tor-rtcompat: Note that SpawnBlocking isn't for CPU-bound tasks.</title>
<updated>2025-01-07T18:27:14Z</updated>
<author>
<name>Wesley Aptekar-Cassels</name>
<email>me@wesleyac.com</email>
</author>
<published>2025-01-07T16:21:59Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=d05dc32108ef6e11fde481024543cd943268ee8d'/>
<id>urn:sha1:d05dc32108ef6e11fde481024543cd943268ee8d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-rtcompat: Use GAT instead of RPIT in SpawnBlocking trait.</title>
<updated>2025-01-07T18:27:14Z</updated>
<author>
<name>Wesley Aptekar-Cassels</name>
<email>me@wesleyac.com</email>
</author>
<published>2024-12-19T19:30:29Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=665d3145a0db86bd1fbd7549b64e21a160c45ff1'/>
<id>urn:sha1:665d3145a0db86bd1fbd7549b64e21a160c45ff1</id>
<content type='text'>
Due to the limitations on RPIT, it's better to use a GAT for now.
</content>
</entry>
<entry>
<title>tor-rtcompat: Add note about what to use spawn_blocking for.</title>
<updated>2025-01-07T18:27:14Z</updated>
<author>
<name>Wesley Aptekar-Cassels</name>
<email>me@wesleyac.com</email>
</author>
<published>2024-12-19T18:45:42Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=078606dd66323a9e012e10c42e03fe8c0ea87619'/>
<id>urn:sha1:078606dd66323a9e012e10c42e03fe8c0ea87619</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-rtcompat: Link to spawn_blocking docs.</title>
<updated>2025-01-07T18:26:28Z</updated>
<author>
<name>Wesley Aptekar-Cassels</name>
<email>me@wesleyac.com</email>
</author>
<published>2024-12-19T18:21:02Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=0508151bd1b7ea53df03d02727bdacae3c0ac7a3'/>
<id>urn:sha1:0508151bd1b7ea53df03d02727bdacae3c0ac7a3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-rtcompat: Add spawn_blocking to Runtime trait.</title>
<updated>2025-01-07T18:26:28Z</updated>
<author>
<name>Wesley Aptekar-Cassels</name>
<email>me@wesleyac.com</email>
</author>
<published>2024-12-18T20:57:30Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=5f91a2b5fa6f343a51cc325ee7a9519f7523d14c'/>
<id>urn:sha1:5f91a2b5fa6f343a51cc325ee7a9519f7523d14c</id>
<content type='text'>
This adds a new SpawnBlocking trait, which exposes the spawn_blocking
function that tokio, async-std, and other runtimes have.
</content>
</entry>
<entry>
<title>tor-rtcompat: Replace bad_api_usage with UnsupportedStreamOp.</title>
<updated>2024-12-10T10:34:48Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2024-12-09T15:27:37Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=2d40f6cbc12543c068764bcaed2bdf3e2c556550'/>
<id>urn:sha1:2d40f6cbc12543c068764bcaed2bdf3e2c556550</id>
<content type='text'>
</content>
</entry>
</feed>
