[][src]Struct mio_aio::AioCb

pub struct AioCb<'a> { /* fields omitted */ }

Methods

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

Wrapper around nix::sys::aio::AioCb.

Implements mio::Evented. After creation, use mio::Evented::register to connect to the event loop

pub fn from_fd(fd: RawFd, prio: c_int) -> AioCb<'a>[src]

Wraps nix::sys::aio::AioCb::from_fd.

pub fn from_boxed_slice(
    fd: RawFd,
    offs: u64,
    buf: Box<dyn Borrow<[u8]>>,
    prio: c_int,
    opcode: LioOpcode
) -> AioCb<'a>
[src]

Creates a nix::sys::aio::AioCb from almost any kind of boxed slice

pub fn from_boxed_mut_slice(
    fd: RawFd,
    offs: u64,
    buf: Box<dyn BorrowMut<[u8]>>,
    prio: c_int,
    opcode: LioOpcode
) -> AioCb<'a>
[src]

Creates a nix::sys::aio::AioCb from almost any kind of mutable boxed slice

pub fn from_mut_slice(
    fd: RawFd,
    offs: u64,
    buf: &'a mut [u8],
    prio: c_int,
    opcode: LioOpcode
) -> AioCb
[src]

Wraps nix::sys::aio::from_mut_slice

Not as useful as it sounds, because in typical mio use cases, the compiler can't guarantee that the slice's lifetime is respected.

pub fn from_slice(
    fd: RawFd,
    offs: u64,
    buf: &'a [u8],
    prio: c_int,
    opcode: LioOpcode
) -> AioCb
[src]

Wraps nix::sys::aio::from_slice

Mostly useful for writing constant slices

pub fn buf_ref(&mut self) -> BufRef[src]

return an AioCb's inner BufRef

It is an error to call this method while the AioCb is still in progress.

pub fn aio_return(&self) -> Result<isize>[src]

Wrapper for nix::sys::aio::aio_return

pub fn cancel(&self) -> Result<AioCancelStat>[src]

Wrapper for nix::sys::aio::AioCb::cancel

pub fn error(&self) -> Result<()>[src]

Wrapper for nix::sys::aio::AioCb::error

Not usually needed, since mio_aio always uses kqueue for notification.

pub fn fsync(&self, mode: AioFsyncMode) -> Result<()>[src]

Wrapper for nix::sys::aio::AioCb::fsync

pub fn read(&self) -> Result<()>[src]

Wrapper for nix::sys::aio::AioCb::read

pub fn write(&self) -> Result<()>[src]

Wrapper for nix::sys::aio::AioCb::write

Trait Implementations

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

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

Auto Trait Implementations

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

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

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]