-
Notifications
You must be signed in to change notification settings - Fork 343
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Similar to the future::timeout
free function we should add a Stream::timeout
method. This method should be marked as "unstable".
Example
// This example will never actually time out, but you get the idea.
let s = stream::repeat(1u8).take(100);
let s = s.timeout(Duration::from_secs(1));
while let Some(_) = s.next().await {
dbg!();
}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers