<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-rpcbase/src/lib.rs, branch arti-v1.1.10</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.1.10</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.1.10'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2023-08-04T11:45:04Z</updated>
<entry>
<title>Run add_warnings on all files.</title>
<updated>2023-08-04T11:45:04Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-08-04T11:45:04Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=cec6d0ce33b4b5cebbce57f55faec83397e9c953'/>
<id>urn:sha1:cec6d0ce33b4b5cebbce57f55faec83397e9c953</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Run maint/add_warning to actually apply new lint allows</title>
<updated>2023-07-10T12:49:51Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2023-07-10T11:19:32Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=473447a82e099fd52a674c28f5bc24b3e05208c0'/>
<id>urn:sha1:473447a82e099fd52a674c28f5bc24b3e05208c0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Run add_warning to remove `missing_panics_doc` deny.</title>
<updated>2023-07-06T18:32:23Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-07-06T18:32:23Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=03f9f9987a7ba42368d82363bef7f569e32ffe2c'/>
<id>urn:sha1:03f9f9987a7ba42368d82363bef7f569e32ffe2c</id>
<content type='text'>
Closes #950.
</content>
</entry>
<entry>
<title>lints: Run maint/add_warning to actually apply new lints</title>
<updated>2023-06-21T11:15:41Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2023-06-21T10:29:46Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=161b9844dae0aaa2e63bbc77c512d061be6bb390'/>
<id>urn:sha1:161b9844dae0aaa2e63bbc77c512d061be6bb390</id>
<content type='text'>
</content>
</entry>
<entry>
<title>RPC: Functionality to downcast dyn Object to a dyn Trait.</title>
<updated>2023-06-12T17:35:28Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-06-07T17:30:36Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=8166a29746b8fa7b447fc0f3929668e35c3314ae'/>
<id>urn:sha1:8166a29746b8fa7b447fc0f3929668e35c3314ae</id>
<content type='text'>
This is a rather tricky piece of functionality.  It works as
follows.

We introduce a `CastTable` type.  Each `CastTable` tells us how to
downcast `dyn Object` for objects of a single concrete type.
The `Object` type now has a `get_casttable` method that returns
an empty `CastTable` by default.

`CastTable` is, internally, a map from the `TypeId` of the target
dyn Trait reference type to a function
`fn(&amp;dyn Object) -&gt; &amp;dyn Trait`.  These functions are stored as
`Box&lt;dyn Any + ...&gt;`.  (They are Boxed because they may refer to
generic functions, which you can't get a static reference to,
and they're Any because the functions have different types.)

The `decl_object!` macro now implements `get_casttable` as
appropriate.  (The syntax is a bit janky, but that's what we get
for not using derive_adhoc.)  For non-generic types, `get_casttable`
uses a Lazy&lt;CastTable&gt;`. to initialize a CastTable exactly once.
For generic types, it use a `Lazy&lt;RwLock&lt;HashMap&lt;..&gt;&gt;` to
build one CastTable per instantiation of the generic type.

This could probably be optimized a bit more, the yaks could be
shaved in a more scintillating hairstyle, and the syntax for
generic `decl_object` could definitely be improved.
</content>
</entry>
<entry>
<title>rpc: Remove downgrade_owned for now</title>
<updated>2023-05-24T14:15:56Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-05-24T13:24:45Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=936387efee359a38a22a920568090b204dfd07be'/>
<id>urn:sha1:936387efee359a38a22a920568090b204dfd07be</id>
<content type='text'>
Rationale: Our weak-vs-strong design is a bit confused at the moment
due to concerns about deduplication and  capability semantics.  It's
not clear that a general "change strong to weak" method is
compatible with what we want to provide.
</content>
</entry>
<entry>
<title>rpc: Implement functionality to remove objects from a session</title>
<updated>2023-05-24T14:15:56Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-05-23T14:41:56Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=9713e8d3054aafe3f19afd55693bc3159712e595'/>
<id>urn:sha1:9713e8d3054aafe3f19afd55693bc3159712e595</id>
<content type='text'>
I've made doing some design choices here:
  * Reserving "rpc" as a prefix for post-authentication
    functionality that is not arti-specific.
  * Declaring these to be methods on the session rather than methods
    on the objects themselves.

There's a problem with defining an API to drop a weak reference; see
comment in code.
</content>
</entry>
<entry>
<title>rpc: fix documentation for methods in Context.</title>
<updated>2023-05-24T14:15:56Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-05-23T14:17:25Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=15a8644bf7dd3b8d98a485b808af3dfba7f7f6a6'/>
<id>urn:sha1:15a8644bf7dd3b8d98a485b808af3dfba7f7f6a6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>RPC: Add "register" methods to RequestContext.</title>
<updated>2023-05-04T14:35:05Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-25T21:08:47Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=9be9ddb9027fef615613118451bc7e98fbc533b5'/>
<id>urn:sha1:9be9ddb9027fef615613118451bc7e98fbc533b5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rpc: Simplify and clarify SendUpdateError.</title>
<updated>2023-04-19T16:38:26Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-19T16:30:38Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=ffcbd8fe8840f9b2e946b52714d79be04f61f073'/>
<id>urn:sha1:ffcbd8fe8840f9b2e946b52714d79be04f61f073</id>
<content type='text'>
</content>
</entry>
</feed>
