pub fn data_available_on_pipe(
        &mut self,
    ) -> Result<Option<DataPipe>, TransferError<SPIErr, PinErr>> {
        Ok(self.status()?.data_pipe_available())
    }
/// Returns the data pipe where the data is available and `None` if no data available.
///
/// # Examples
/// ```rust
/// // Chip has to be set in listening mode first
/// chip.open_reading_pipe(DataPipe::DP0, b"Node1")?;
/// chip.start_listening()?;
/// // Check if there is any data to read on pipe 1
/// while let Some(pipe) = chip.data_available_on_pipe()? {
///     if pipe == DataPipe::DP1 {
///         // ... read the payload
///         delay.delay_ms(50); // small delay between calls of data_available
///     }
/// }
/// ```
Returns the data pipe where the data is available and `None` if no data available.
Returns the data pipe where the data is available and ` None ` if no data available .
pub fn data_available_on_pipe(
        &mut self,
    ) -> Result<Option<DataPipe>, TransferError<SPIErr, PinErr>> {
        Ok(self.status()?.data_pipe_available())
    }
pub fn data_available_on_pipe ( & mut self , ) -> Result < Option < DataPipe > , TransferError < SPIErr , PinErr > > { Ok ( self . status ( ) ? . data_pipe_available ( ) ) }
Returns the data pipe where the data is available and `None` if no data available.
Returns the data pipe where the data is available and ` None ` if no data available .
&mut self
&mut self
examples
```rust
Chip has to be set in listening mode first
chip.open_reading_pipe(DataPipe::DP0, b"Node1")?;
chip.start_listening()?;
Check if there is any data to read on pipe 1
while let Some(pipe) = chip.data_available_on_pipe(). {
if pipe == DataPipe::DP1 {
read the payload
delay.delay_ms(50); // small delay between calls of data_available
}
}
```
` ` ` rust Chip has to be set in listening mode first chip . open_reading_pipe ( DataPipe :: DP0 b " Node1 " ) ? ; chip . start_listening () ? ; Check if there is any data to read on pipe 1 while let Some ( pipe ) = chip . data_available_on_pipe () . { if pipe == DataPipe :: DP1 { read the payload delay . delay_ms ( 50 ) ; // small delay between calls of data_available } } ` ` `