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]

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

[src]

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

[src]

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.

[src]

Update the notification settings for an existing aiocb

[src]

Cancels an outstanding AIO request.

[src]

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

[src]

An asynchronous version of fsync.

[src]

Asynchronously reads from a file descriptor into a buffer

[src]

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.

[src]

Asynchronously writes from a buffer to a file descriptor

Trait Implementations

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

[src]

Formats the value using the given formatter. Read more

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

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