pub fn read(&self, buf: &mut [u8]) -> Result<usize> {
        match unsafe { libc::read(self.fd, buf as *mut _ as *mut libc::c_void, buf.len()) } {
            -1 => Err(io::Error::from(errno()).into()),
            size => Ok(size as usize),
        }
    }
/// Reads this device
///
/// Note that this does not require exclusive access to the device.
Reads this device
Note that this does not require exclusive access to the device.
Reads this device Note that this does not require exclusive access to the device .
pub fn read(&self, buf: &mut [u8]) -> Result<usize> {
        match unsafe { libc::read(self.fd, buf as *mut _ as *mut libc::c_void, buf.len()) } {
            -1 => Err(io::Error::from(errno()).into()),
            size => Ok(size as usize),
        }
    }
pub fn read ( & self , buf : & mut [ u8 ] ) -> Result < usize > { match unsafe { libc :: read ( self . fd , buf as * mut _ as * mut libc :: c_void , buf . len ( ) ) } { - 1 => Err ( io :: Error :: from ( errno ( ) ) . into ( ) ) , size => Ok ( size as usize ) , } }
Reads this device
Note that this does not require exclusive access to the device.
Reads this device Note that this does not require exclusive access to the device .
&self
buf
&mut [u8]