/// Queue up a pwrite operation.
Queue up a pwrite operation.
Queue up a pwrite operation .
pub fn pwrite<F: AsRawFd>(&mut self, file: &F, buf: Wb, off: Offset, tok: T) -> Result<(), (Wb, T)> {
        if self.full() {
            Err((buf, tok))
        } else {
            let bufptr = buf.wrbuf().as_ptr();
            let buflen = buf.wrbuf().len();
            let iocb = Iocb {
                iocb: aio::Struct_iocb {
                    aio_buf: bufptr as u64,
                    aio_count: buflen as u64,
                    .. self.pack_iocb(aio::Iocmd::IO_CMD_PWRITE, file, off)
                },
                op: IoOp::Pwrite(buf, tok),
            };
            self.prep_iocb(iocb)
        }
    }
pub fn pwrite < F : AsRawFd > ( & mut self , file : & F , buf : Wb , off : Offset , tok : T ) -> Result < ( ) , ( Wb , T ) > { if self . full ( ) { Err ( ( buf , tok ) ) } else { let bufptr = buf . wrbuf ( ) . as_ptr ( ) ; let buflen = buf . wrbuf ( ) . len ( ) ; let iocb = Iocb { iocb : aio :: Struct_iocb { aio_buf : bufptr as u64 , aio_count : buflen as u64 , .. self . pack_iocb ( aio :: Iocmd :: IO_CMD_PWRITE , file , off ) } , op : IoOp :: Pwrite ( buf , tok ) , } ; self . prep_iocb ( iocb ) } }
Queue up a pwrite operation.
Queue up a pwrite operation .
&mut self
file
&F
buf
Wb
off
Offset
tok
T