pub fn read_exact_to<F: FileReadWriteVolatile>(
        &mut self,
        mut dst: F,
        mut count: usize,
    ) -> io::Result<()> {
        while count > 0 {
            match self.read_to(&mut dst, count) {
                Ok(0) => {
                    return Err(io::Error::new(
                        io::ErrorKind::UnexpectedEof,
                        "failed to fill whole buffer",
                    ))
                }
                Ok(n) => count -= n,
                Err(ref e) if e.kind() == io::ErrorKind::Interrupted => {}
                Err(e) => return Err(e),
            }
        }

        Ok(())
    }
/// Reads exactly size of data from the descriptor chain buffer into a file descriptor.
Reads exactly size of data from the descriptor chain buffer into a file descriptor.
Reads exactly size of data from the descriptor chain buffer into a file descriptor .
pub fn read_exact_to<F: FileReadWriteVolatile>(
        &mut self,
        mut dst: F,
        mut count: usize,
    ) -> io::Result<()> {
        while count > 0 {
            match self.read_to(&mut dst, count) {
                Ok(0) => {
                    return Err(io::Error::new(
                        io::ErrorKind::UnexpectedEof,
                        "failed to fill whole buffer",
                    ))
                }
                Ok(n) => count -= n,
                Err(ref e) if e.kind() == io::ErrorKind::Interrupted => {}
                Err(e) => return Err(e),
            }
        }
        Ok(())
    }
pub fn read_exact_to < F : FileReadWriteVolatile > ( & mut self , mut dst : F , mut count : usize , ) -> io :: Result < ( ) > { while count > 0 { match self . read_to ( & mut dst , count ) { Ok ( 0 ) => { return Err ( io :: Error :: new ( io :: ErrorKind :: UnexpectedEof , " " , ) ) } Ok ( n ) => count -= n , Err ( ref e ) if e . kind ( ) == io :: ErrorKind :: Interrupted => { } Err ( e ) => return Err ( e ) , } } Ok ( ( ) ) }
Reads exactly size of data from the descriptor chain buffer into a file descriptor.
Reads exactly size of data from the descriptor chain buffer into a file descriptor .
&mut self
dst
F
count
usize
&mut self
dst
F
count
usize