pub async fn recv(&mut self) -> Event<T> {
        loop {
            match self
                .rx
                .next()
                .await
                .expect("watch stream must not terminate")
            {
                Ok(ev) => {
                    self.ready = true;
                    return ev;
                }
                Err(error) => {
                    self.ready = false;
                    info!(%error, "Disconnected");
                    time::sleep(time::Duration::from_secs(1)).await;
                }
            }
        }
    }
/// Receive the next event in the stream.
///
/// If the stream fails, log the error and sleep for 1s before polling for a reset event.
Receive the next event in the stream.
If the stream fails, log the error and sleep for 1s before polling for a reset event.
Receive the next event in the stream . If the stream fails log the error and sleep for 1s before polling for a reset event .
pub async fn recv(&mut self) -> Event<T> {
        loop {
            match self
                .rx
                .next()
                .await
                .expect("watch stream must not terminate")
            {
                Ok(ev) => {
                    self.ready = true;
                    return ev;
                }
                Err(error) => {
                    self.ready = false;
                    info!(%error, "Disconnected");
                    time::sleep(time::Duration::from_secs(1)).await;
                }
            }
        }
    }
pub async fn recv ( & mut self ) -> Event < T > { loop { match self . rx . next ( ) . await . expect ( " " ) { Ok ( ev ) => { self . ready = true ; return ev ; } Err ( error ) => { self . ready = false ; info ! ( error " " ) ; time :: sleep ( time :: Duration :: from_secs ( 1 ) ) . await ; } } } }
Receive the next event in the stream.
Receive the next event in the stream .
&mut self
&mut self