pub fn new(port_name: &str) -> Result<Self, ()> {
        Ok(Arduino {
            port: serialport::new(port_name, 9600).open().map_err(|_| ())?,
        })
    }
/// Opens the given serial port.
///
/// # Arguments
///
/// * `port_name`: Name of the serial comm device, e.g. `/dev/ttyUSB0`, `COM3`, etc.
Opens the given serial port.
Opens the given serial port .
pub fn new(port_name: &str) -> Result<Self, ()> {
        Ok(Arduino {
            port: serialport::new(port_name, 9600).open().map_err(|_| ())?,
        })
    }
pub fn new ( port_name : & str ) -> Result < Self , ( ) > { Ok ( Arduino { port : serialport :: new ( port_name , 9600 ) . open ( ) . map_err ( | _ | ( ) ) ? , } ) }
Opens the given serial port.
Opens the given serial port .
port_name
&str
port_name
&str