pub fn write(&self, buf: &[u8]) -> Result<usize> {
        match unsafe { libc::write(self.fd, buf as *const _ as *const libc::c_void, buf.len()) } {
            -1 => Err(io::Error::from(errno()).into()),
            size => Ok(size as usize),
        }
    }
/// Writes this device
///
/// The passed buffer must be the exact length of the report which will be sent to the device.
/// It must be preceded by a single byte which is the report ID or 0x00 if report IDs are not
/// used.
///
/// Note that this does not require exclusive access to the device.
///
/// TODO: Make the extra report ID an abstraction so I don't have to worry about it explicitly.
Writes this device
The passed buffer must be the exact length of the report which will be sent to the device.
It must be preceded by a single byte which is the report ID or 0x00 if report IDs are not
used.

Note that this does not require exclusive access to the device.

Make the extra report ID an abstraction so I don't have to worry about it explicitly.
Writes this device The passed buffer must be the exact length of the report which will be sent to the device . It must be preceded by a single byte which is the report ID or 0x00 if report IDs are not used . Note that this does not require exclusive access to the device . Make the extra report ID an abstraction so I don ' t have to worry about it explicitly .
pub fn write(&self, buf: &[u8]) -> Result<usize> {
        match unsafe { libc::write(self.fd, buf as *const _ as *const libc::c_void, buf.len()) } {
            -1 => Err(io::Error::from(errno()).into()),
            size => Ok(size as usize),
        }
    }
pub fn write ( & self , buf : & [ u8 ] ) -> Result < usize > { match unsafe { libc :: write ( self . fd , buf as * const _ as * const libc :: c_void , buf . len ( ) ) } { - 1 => Err ( io :: Error :: from ( errno ( ) ) . into ( ) ) , size => Ok ( size as usize ) , } }
Writes this device
The passed buffer must be the exact length of the report which will be sent to the device.
Writes this device The passed buffer must be the exact length of the report which will be sent to the device .
&self
buf
&[u8]