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
At the moment, in any Handler, you need to return Try<Output = ()>. This is cool and allows interrupting operations in errors.
But it inflates the code:
// one operation handler
|link| {
worker.work(link);Continue// <- :(}
But everyone wants to:
|link| worker.work(link)
I see two ways
1. Inspired by std::Termination create Termination-like trait
It might look something like this:
traitHandlerResult{typeTry:Try<Output = ()>;fntry_it(self) -> Self::Try;}// impl for ()// impl for all Try
2. Discard `Handlers' outside the internal code (track it #3)
Use $OP_iter so each_iter and others
example above:
At the moment, in any
Handler
, you need to returnTry<Output = ()>
. This is cool and allows interrupting operations in errors.But it inflates the code:
But everyone wants to:
I see two ways
1. Inspired by
std::Termination
createTermination
-like traitIt might look something like this:
2. Discard `Handlers' outside the internal code (track it #3)
Use
$OP_iter
soeach_iter
and othersexample above:
What do you think about this?
In particular @Konard
The text was updated successfully, but these errors were encountered: