fn raw_input(&mut self, data: &[u8]) -> result::Result<(), RawIOError> {
        // Fail fast if the serial is serviced with more data than it can buffer.
        if data.len() > self.fifo_capacity() {
            return Err(RawIOError::Serial(SerialError::FullFifo));
        }

        // Before enqueuing bytes we first check if there is enough free space
        // in the FIFO.
        if self.fifo_capacity() >= data.len() {
            self.enqueue_raw_bytes(data).map_err(RawIOError::Serial)?;
        }
        Ok(())
    }
// This is not used for anything and is basically just a dummy implementation for `raw_input`.
This is not used for anything and is basically just a dummy implementation for `raw_input`.
This is not used for anything and is basically just a dummy implementation for ` raw_input ` .
fn raw_input(&mut self, data: &[u8]) -> result::Result<(), RawIOError> {
        // Fail fast if the serial is serviced with more data than it can buffer.
        if data.len() > self.fifo_capacity() {
            return Err(RawIOError::Serial(SerialError::FullFifo));
        }
        // Before enqueuing bytes we first check if there is enough free space
        // in the FIFO.
        if self.fifo_capacity() >= data.len() {
            self.enqueue_raw_bytes(data).map_err(RawIOError::Serial)?;
        }
        Ok(())
    }
fn raw_input ( & mut self , data : & [ u8 ] ) -> result :: Result < ( ) , RawIOError > { // Fail fast if the serial is serviced with more data than it can buffer. if data . len ( ) > self . fifo_capacity ( ) { return Err ( RawIOError :: Serial ( SerialError :: FullFifo ) ) ; } // Before enqueuing bytes we first check if there is enough free space // in the FIFO. if self . fifo_capacity ( ) >= data . len ( ) { self . enqueue_raw_bytes ( data ) . map_err ( RawIOError :: Serial ) ? ; } Ok ( ( ) ) }
This is not used for anything and is basically just a dummy implementation for `raw_input`.
This is not used for anything and is basically just a dummy implementation for ` raw_input ` .
&mut self
data
&[u8]
&mut self
data
&[u8]