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]

Constructs a new AioCb with no associated buffer.

The resulting AioCb structure is suitable for use with AioCb::fsync.

  • fd File descriptor. Required for all aio functions.
  • prio If POSIX Prioritized IO is supported, then the operation will be prioritized at the process's priority level minus prio
  • sigev_notify Determines how you will be notified of event completion.

Constructs a new AioCb.

  • fd File descriptor. Required for all aio functions.
  • offs File offset
  • buf A memory buffer
  • prio If POSIX Prioritized IO is supported, then the operation will be prioritized at the process's priority level minus prio
  • sigev_notify Determines how you will be notified of event completion.
  • opcode This field is only used for lio_listio. It determines which operation to use for this individual aiocb

Constructs a new AioCb.

Unlike from_mut_slice, this method returns a structure suitable for placement on the heap.

  • fd File descriptor. Required for all aio functions.
  • offs File offset
  • buf A shared memory buffer on the heap
  • prio If POSIX Prioritized IO is supported, then the operation will be prioritized at the process's priority level minus prio
  • sigev_notify Determines how you will be notified of event completion.
  • opcode This field is only used for lio_listio. It determines which operation to use for this individual aiocb

Like 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.

Update the notification settings for an existing aiocb

Cancels an outstanding AIO request.

Retrieve error status of an asynchronous operation. If the request has not yet completed, returns EINPROGRESS. Otherwise, returns Ok or any other error.

An asynchronous version of fsync.

Asynchronously reads from a file descriptor into a buffer

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.

Asynchronously writes from a buffer to a file descriptor

Trait Implementations

impl<'a> Debug for AioCb<'a>
[src]

Formats the value using the given formatter. Read more

impl<'a> Drop for AioCb<'a>
[src]

If the AioCb has no remaining state in the kernel, just drop it. Otherwise, collect its error and return values, so as not to leak resources.

Auto Trait Implementations

impl<'a> !Send for AioCb<'a>

impl<'a> !Sync for AioCb<'a>