/// Called by iced on each tick of the stream. Will receive the stream state & try to emit a
/// message or future state.
Called by iced on each tick of the stream. Will receive the stream state & try to emit a
message or future state.
Called by iced on each tick of the stream . Will receive the stream state & try to emit a message or future state .
async fn tick_stream(mut state: State) -> Option<(FileWatchMessage, State)> {
        match state {
            State::Ready { file_path } => FileWatcher::start_stream(file_path),
            State::Watching {
                ref mut message_rx, ..
            } => message_rx.recv().await.map(|message| (message, state)),
            State::Finished => {
                let _: () = iced::futures::future::pending().await;
                None
            }
        }
    }
async fn tick_stream ( mut state : State ) -> Option < ( FileWatchMessage , State ) > { match state { State :: Ready { file_path } => FileWatcher :: start_stream ( file_path ) , State :: Watching { ref mut message_rx , .. } => message_rx . recv ( ) . await . map ( | message | ( message , state ) ) , State :: Finished => { let _ : ( ) = iced :: futures :: future :: pending ( ) . await ; None } } }
Called by iced on each tick of the stream.
Called by iced on each tick of the stream .
state
State