4 releases

0.21.0 Dec 18, 2024
0.21.0-rc.5 Dec 17, 2024

#343 in Concurrency

Download history 31/week @ 2024-12-11 740/week @ 2024-12-18 342/week @ 2024-12-25 493/week @ 2025-01-01 938/week @ 2025-01-08

2,544 downloads per month
Used in 24 crates (4 directly)

MIT/Apache

12KB

re_capabilities

Part of the rerun family of crates.

Latest version Documentation MIT Apache

Specifies capability tokens, required by different parts of the code base. These are tokens passed down the call tree, to explicitly allow different capabilities in different parts of the code base.


lib.rs:

Specifies capability tokens, required by different parts of the code base. These are tokens passed down the call tree, to explicitly allow different capabilities in different parts of the code base.

For instance, the MainThreadToken is taken by argument in functions that needs to run on the main thread. By requiring this token, you guarantee at compile-time that the function is only called on the main thread.

All capability tokens should be created in the top-level of the call tree, (i.e. in fn main) and passed down to all functions that require it. That way you can be certain in what an area of code is allowed to do.

See cap-std for another capability-centric crate.

Feature flags

Dependencies

~0.2–6.5MB
~36K SLoC