TimelyDataflow / differential-dataflow

An implementation of differential dataflow using timely dataflow on Rust.
MIT License
2.59k stars 184 forks source link

Remove `'static` requirement from difference traits #501

Closed frankmcsherry closed 5 months ago

frankmcsherry commented 5 months ago

Our difference traits, Semigroup, Monoid, and Abelian, have been defined to require Data, which has been a helpful catch-all trait that includes 'static. However, it is reasonable to want to implement these traits for lifetimed data, for example a Cow<'a, Diff> type.

This PR replaces Data with Clone in the requirements for the difference traits, and moves the 'static and occasionally Ord requirements to those locations where they are required. This is a bit noisier, but I think a bit more "accurate".