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
This is a core iteration "order of execution" operation, enabling people to author:
before
// Manual sequential iteration.for await n in0..10{dbg!(n);}for await n in11..20{dbg!(n);}
after
// The same semantics using `chain`.for await n in((0..10),(11..20)).chain(){dbg!(n)}
This is particularly useful to do things like "send one last message after EOF".
Design
pubtraitChain{/// What's the return type of our stream?typeItem;/// What stream do we return?typeStream:Stream<Item = Self::Item>;/// Combine multiple streams into a single stream.fnchain(self) -> Self::Stream;}
This is a core iteration "order of execution" operation, enabling people to author:
before
after
This is particularly useful to do things like "send one last message after EOF".
Design
Tasks
Chain
trait Init zip and chain traits #73impl Chain for vec
Init zip and chain traits #73impl Chain for array
Init zip and chain traits #73impl Chain for tuple
The text was updated successfully, but these errors were encountered: