Remove Serde trait bounds from EventSource and QuerySource#164
Remove Serde trait bounds from EventSource and QuerySource#164maciekglowka wants to merge 3 commits intomainfrom
Conversation
| } | ||
| } | ||
|
|
||
| impl<T: Serialize + DeserializeOwned + Clone + Send + 'static> EventSource<T> { |
There was a problem hiding this comment.
OK, so it looks like we just moved the problem somewhere else :-/
I thought we would be able to get rid of the serialize bounds for register at least and that they would only remain for bind.
But this bound is required because the events are possibly schedulable...
Maybe it would be possible to remove the bounds on register but make sure that the bounds remains on the various schedule methods? But since Rust does not have specialization, I am not sure this approach is at all possible, because the scheduler registry would need to somehow ensure at run time that T is indeed serializable...
If it can't be solved, then I'd leave things as they are since this does not seem to make anything possible that wasn't before.
There was a problem hiding this comment.
Ok, sorry. I must have misunderstood the use of the non-serializable events. Indeed we made hard bound on the scheduler registry (to be able to serialize the entire queue). I will look deeper into it.
There was a problem hiding this comment.
Well, I didn't realize that this wouldn't be possible either, sorry for directing you to a dead end...
|
@maciekglowka Should we close this PR or is there any way forward? |
|
If I remember correctly we have discussed to drop it as we didn't see a worthy solution. |
No description provided.