TimelyDataflow / timely-dataflow

A modular implementation of timely dataflow in Rust
MIT License
3.25k stars 272 forks source link

publicly expose the `capability` module #512

Open petrosagg opened 1 year ago

petrosagg commented 1 year ago

The CapabilityTrait trait is part of the public API of timely (e.g OutputHandle::session expects one), but the trait itself is not publicly accessible.

This is because implementing this trait would circumvent the safety properties of capabilities. However, not exposing it also prevents safe wrapping of handles to provide additional functionality on top of them.

This PR offers a solution by making the capability module public and using the sealed trait pattern to prevent any foreign crate from implementing CapabilityTrait.