Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a870ff commit 3b03af8Copy full SHA for 3b03af8
1 file changed
src/os/shared.rs
@@ -44,9 +44,12 @@ pub struct TerminalEvents;
44
45
impl Iterator for TerminalEvents {
46
type Item = Event;
47
+ /// Returns the next terminal event, or `None` if no event is available
48
+ /// within the poll timeout.
49
+ ///
50
+ /// Note: `None` here means "no event right now", not "iteration complete".
51
+ /// The consumer should use `while running` instead of `for evt in ...`.
52
fn next(&mut self) -> Option<Event> {
- // Poll with timeout instead of blocking read to allow
- // the caller to check for shutdown signals
53
match poll(POLL_TIMEOUT) {
54
Ok(true) => read().ok(),
55
Ok(false) | Err(_) => None,
0 commit comments