fn new(node: &path::Path) -> Result<Self> {
        let raw_path = node.to_str().unwrap();
        match unsafe { libc::open(raw_path.as_ptr() as *const i8, libc::O_RDWR | libc::O_NONBLOCK) } {
            -1 => Err(io::Error::from(errno()).into()),
            fd => Ok(HidDevice { fd: fd }),
        }
    }
/// Creates a new HidDevice from a device node path
Creates a new HidDevice from a device node path
Creates a new HidDevice from a device node path
fn new(node: &path::Path) -> Result<Self> {
        let raw_path = node.to_str().unwrap();
        match unsafe { libc::open(raw_path.as_ptr() as *const i8, libc::O_RDWR | libc::O_NONBLOCK) } {
            -1 => Err(io::Error::from(errno()).into()),
            fd => Ok(HidDevice { fd: fd }),
        }
    }
fn new ( node : & path :: Path ) -> Result < Self > { let raw_path = node . to_str ( ) . unwrap ( ) ; match unsafe { libc :: open ( raw_path . as_ptr ( ) as * const i8 , libc :: O_RDWR | libc :: O_NONBLOCK ) } { - 1 => Err ( io :: Error :: from ( errno ( ) ) . into ( ) ) , fd => Ok ( HidDevice { fd : fd } ) , } }
Creates a new HidDevice from a device node path
Creates a new HidDevice from a device node path
node
&path::Path