pub fn preadv<F: AsRawFd>(&mut self, file: &F, mut buf: Vec<Rb>, off: Offset, tok: T) -> Result<(), (Vec<Rb>, T)> {
        if self.full() {
            Err((buf, tok))
        } else {
            let mut iov : Vec<_> = (0..buf.len())
                .map(|b| aio::Struct_iovec { iov_base: buf[b].rdbuf().as_mut_ptr(),
                                             iov_len: buf[b].rdbuf().len() as u64 })
                .collect();
                
            let iocb = Iocb {
                iocb: aio::Struct_iocb {
                    aio_buf: iov.as_mut_ptr() as u64,
                    aio_count: iov.len() as u64,

                    .. self.pack_iocb(aio::Iocmd::IO_CMD_PREADV, file, off)
                },
                op: IoOp::Preadv(buf, tok),
            };
            self.prep_iocb(iocb)
        }
    }
/// Queue up a preadv operation.
Queue up a preadv operation.
Queue up a preadv operation .
pub fn preadv<F: AsRawFd>(&mut self, file: &F, mut buf: Vec<Rb>, off: Offset, tok: T) -> Result<(), (Vec<Rb>, T)> {
        if self.full() {
            Err((buf, tok))
        } else {
            let mut iov : Vec<_> = (0..buf.len())
                .map(|b| aio::Struct_iovec { iov_base: buf[b].rdbuf().as_mut_ptr(),
                                             iov_len: buf[b].rdbuf().len() as u64 })
                .collect();
            let iocb = Iocb {
                iocb: aio::Struct_iocb {
                    aio_buf: iov.as_mut_ptr() as u64,
                    aio_count: iov.len() as u64,
                    .. self.pack_iocb(aio::Iocmd::IO_CMD_PREADV, file, off)
                },
                op: IoOp::Preadv(buf, tok),
            };
            self.prep_iocb(iocb)
        }
    }
pub fn preadv < F : AsRawFd > ( & mut self , file : & F , mut buf : Vec < Rb > , off : Offset , tok : T ) -> Result < ( ) , ( Vec < Rb > , T ) > { if self . full ( ) { Err ( ( buf , tok ) ) } else { let mut iov : Vec < _ > = ( 0 .. buf . len ( ) ) . map ( | b | aio :: Struct_iovec { iov_base : buf [ b ] . rdbuf ( ) . as_mut_ptr ( ) , iov_len : buf [ b ] . rdbuf ( ) . len ( ) as u64 } ) . collect ( ) ; let iocb = Iocb { iocb : aio :: Struct_iocb { aio_buf : iov . as_mut_ptr ( ) as u64 , aio_count : iov . len ( ) as u64 , .. self . pack_iocb ( aio :: Iocmd :: IO_CMD_PREADV , file , off ) } , op : IoOp :: Preadv ( buf , tok ) , } ; self . prep_iocb ( iocb ) } }
Queue up a preadv operation.
Queue up a preadv operation .
&mut self
file
&F
buf
Vec<Rb>
off
Offset
tok
T
&mut self
file
&F
buf
Vec<Rb>
off
Offset
tok
T