Struct nix::sys::aio::AioCb [−][src]
pub struct AioCb<'a> { /* fields omitted */ }The basic structure used by all aio functions. Each aiocb represents one
I/O request.
Methods
impl<'a> AioCb<'a>[src]
impl<'a> AioCb<'a>pub fn from_fd(fd: RawFd, prio: c_int, sigev_notify: SigevNotify) -> AioCb<'a>[src]
pub fn from_fd(fd: RawFd, prio: c_int, sigev_notify: SigevNotify) -> AioCb<'a>Constructs a new AioCb with no associated buffer.
The resulting AioCb structure is suitable for use with AioCb::fsync.
fdFile descriptor. Required for all aio functions.prioIf POSIX Prioritized IO is supported, then the operation will be prioritized at the process's priority level minuspriosigev_notifyDetermines how you will be notified of event completion.
pub fn from_mut_slice(
fd: RawFd,
offs: off_t,
buf: &'a mut [u8],
prio: c_int,
sigev_notify: SigevNotify,
opcode: LioOpcode
) -> AioCb<'a>[src]
pub fn from_mut_slice(
fd: RawFd,
offs: off_t,
buf: &'a mut [u8],
prio: c_int,
sigev_notify: SigevNotify,
opcode: LioOpcode
) -> AioCb<'a>Constructs a new AioCb.
fdFile descriptor. Required for all aio functions.offsFile offsetbufA memory bufferprioIf POSIX Prioritized IO is supported, then the operation will be prioritized at the process's priority level minuspriosigev_notifyDetermines how you will be notified of event completion.opcodeThis field is only used forlio_listio. It determines which operation to use for this individual aiocb
pub fn from_boxed_slice(
fd: RawFd,
offs: off_t,
buf: Rc<Box<[u8]>>,
prio: c_int,
sigev_notify: SigevNotify,
opcode: LioOpcode
) -> AioCb<'a>[src]
pub fn from_boxed_slice(
fd: RawFd,
offs: off_t,
buf: Rc<Box<[u8]>>,
prio: c_int,
sigev_notify: SigevNotify,
opcode: LioOpcode
) -> AioCb<'a>Constructs a new AioCb.
Unlike from_mut_slice, this method returns a structure suitable for
placement on the heap.
fdFile descriptor. Required for all aio functions.offsFile offsetbufA shared memory buffer on the heapprioIf POSIX Prioritized IO is supported, then the operation will be prioritized at the process's priority level minuspriosigev_notifyDetermines how you will be notified of event completion.opcodeThis field is only used forlio_listio. It determines which operation to use for this individual aiocb
pub fn from_slice(
fd: RawFd,
offs: off_t,
buf: &'a [u8],
prio: c_int,
sigev_notify: SigevNotify,
opcode: LioOpcode
) -> AioCb[src]
pub fn from_slice(
fd: RawFd,
offs: off_t,
buf: &'a [u8],
prio: c_int,
sigev_notify: SigevNotify,
opcode: LioOpcode
) -> AioCbLike from_mut_slice, but works on constant slices rather than
mutable slices.
An AioCb created this way cannot be used with read, and its
LioOpcode cannot be set to LIO_READ. This method is useful when
writing a const buffer with AioCb::write, since from_mut_slice can't
work with const buffers.
pub fn set_sigev_notify(&mut self, sigev_notify: SigevNotify)[src]
pub fn set_sigev_notify(&mut self, sigev_notify: SigevNotify)Update the notification settings for an existing aiocb
pub fn cancel(&mut self) -> Result<AioCancelStat>[src]
pub fn cancel(&mut self) -> Result<AioCancelStat>Cancels an outstanding AIO request.
pub fn error(&mut self) -> Result<()>[src]
pub fn error(&mut self) -> Result<()>Retrieve error status of an asynchronous operation. If the request has
not yet completed, returns EINPROGRESS. Otherwise, returns Ok or
any other error.
pub fn fsync(&mut self, mode: AioFsyncMode) -> Result<()>[src]
pub fn fsync(&mut self, mode: AioFsyncMode) -> Result<()>An asynchronous version of fsync.
pub fn read(&mut self) -> Result<()>[src]
pub fn read(&mut self) -> Result<()>Asynchronously reads from a file descriptor into a buffer
pub fn aio_return(&mut self) -> Result<isize>[src]
pub fn aio_return(&mut self) -> Result<isize>Retrieve return status of an asynchronous operation. Should only be
called once for each AioCb, after AioCb::error indicates that it has
completed. The result is the same as for read, write, of fsync.
pub fn write(&mut self) -> Result<()>[src]
pub fn write(&mut self) -> Result<()>Asynchronously writes from a buffer to a file descriptor
Trait Implementations
impl<'a> Debug for AioCb<'a>[src]
impl<'a> Debug for AioCb<'a>fn fmt(&self, fmt: &mut Formatter) -> Result[src]
fn fmt(&self, fmt: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'a> Drop for AioCb<'a>[src]
impl<'a> Drop for AioCb<'a>