You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah this may end up being a bit tricky in current type design of actor:
We allow infinite Recipient<T> -> Recipient<U> -> Recipient<V> conversions provided the messages can be converted (V -> U -> T). But we don't want to add the bound in the other direction (T -> U), as that might not be possible for user to fullfil at all.
So our Recipient<V> cannot return SomeError<V>, and it also cannot return SomeError<T>, because the whole point of Recipient is to erase the T generic parameter.
It could return Box<dyn Any>, but that would incur the boxing costs on all failures to send (some users may send large volume of big messages that are largely dropped, and don't care about it).
Maybe there is some other way, perhaps registering some form or callback etc.
Flume has a TrySendError which returns the message that we attempted to send.
We should surface this to our API so actors can decide what to do with the message if it failed to send.
This might create an explosion of generics so let's approach this carefully.
The text was updated successfully, but these errors were encountered: